From 17ef5342e8a5bf790364a83fdac77579c84d5391 Mon Sep 17 00:00:00 2001 From: BBI-JohnwillKeating <75271593+BBI-JohnwillKeating@users.noreply.github.com> Date: Wed, 27 Jul 2022 18:27:53 -0700 Subject: [PATCH] Update ffx_fsr2_shaders_dx12.cpp Fixed buffer overrun. outBlob is a pointer so using &outBlob causes the memset to write 72 bytes to the 8 byte location of the pointer rather than the location of the struct pointed to by the pointer. --- src/ffx-fsr2-api/dx12/shaders/ffx_fsr2_shaders_dx12.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ffx-fsr2-api/dx12/shaders/ffx_fsr2_shaders_dx12.cpp b/src/ffx-fsr2-api/dx12/shaders/ffx_fsr2_shaders_dx12.cpp index 6e74429..1ca60ce 100644 --- a/src/ffx-fsr2-api/dx12/shaders/ffx_fsr2_shaders_dx12.cpp +++ b/src/ffx-fsr2-api/dx12/shaders/ffx_fsr2_shaders_dx12.cpp @@ -388,6 +388,6 @@ FfxErrorCode fsr2GetPermutationBlobByIndex( } // return an empty blob - memset(&outBlob, 0, sizeof(Fsr2ShaderBlobDX12)); + memset(outBlob, 0, sizeof(Fsr2ShaderBlobDX12)); return FFX_OK; }