From a08dadde32fb5af11d006113a04bf5bf09c7b99b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Mon, 29 Oct 2018 11:12:13 +0100 Subject: [PATCH] vkd3d: Avoid division by zero in GetResourceAllocationInfo() (Coverity). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- libs/vkd3d/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 4f5cdd69..e41a309a 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -2072,7 +2072,7 @@ static D3D12_RESOURCE_ALLOCATION_INFO * STDMETHODCALLTYPE d3d12_device_GetResour } } - if (desc->Alignment % info->Alignment) + if (valid && desc->Alignment % info->Alignment) { WARN("Invalid resource alignment %#"PRIx64" (required %#"PRIx64").\n", desc->Alignment, info->Alignment);