Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/doitsujin/dxvk.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Rebohle <philip.rebohle@tu-dortmund.de>2023-11-02 19:49:38 +0300
committerPhilip Rebohle <philip.rebohle@tu-dortmund.de>2023-11-02 19:49:38 +0300
commit2ed1778df9ea5d81fff22f76f125b08995454847 (patch)
treed5c2ed97ec2fd625edfc65efaba2ce4147b394fc
parenta427d22cdee4a5166e000b0a1f540c52b42afa13 (diff)
[d3d11] Handle potential integer overflow when validating draw offsets
Apparently some games use -1 as an argument offset, which is nonsensical and leads to issues.
-rw-r--r--src/d3d11/d3d11_context.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/d3d11/d3d11_context.h b/src/d3d11/d3d11_context.h
index 618c07d6..7383507f 100644
--- a/src/d3d11/d3d11_context.h
+++ b/src/d3d11/d3d11_context.h
@@ -1130,7 +1130,7 @@ namespace dxvk {
if (likely(pBuffer != nullptr))
bufferSize = static_cast<D3D11Buffer*>(pBuffer)->Desc()->ByteWidth;
- return bufferSize >= Offset + Size;
+ return uint64_t(bufferSize) >= uint64_t(Offset) + uint64_t(Size);
}
private: