From dd7ffbc803a4d9d9463858456a8873bab885e019 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sun, 12 Sep 2021 16:18:25 +0200 Subject: [PATCH] [d3d11] Also validate draw buffer for DispatchIndirect Oversight. --- src/d3d11/d3d11_context.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/d3d11/d3d11_context.cpp b/src/d3d11/d3d11_context.cpp index e5259c79d..ad239d713 100644 --- a/src/d3d11/d3d11_context.cpp +++ b/src/d3d11/d3d11_context.cpp @@ -1372,6 +1372,9 @@ namespace dxvk { D3D10DeviceLock lock = LockContext(); SetDrawBuffers(pBufferForArgs, nullptr); + if (!ValidateDrawBufferSize(pBufferForArgs, AlignedByteOffsetForArgs, sizeof(VkDispatchIndirectCommand))) + return; + EmitCs([cOffset = AlignedByteOffsetForArgs] (DxvkContext* ctx) { ctx->dispatchIndirect(cOffset);