vkd3d: Avoid out-of-bounds array access in d3d12_device_CopyDescriptors().

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2018-12-06 15:28:35 +01:00 committed by Alexandre Julliard
parent e62e1dadb5
commit b868b5a258
1 changed files with 4 additions and 3 deletions

View File

@ -1993,13 +1993,14 @@ static void STDMETHODCALLTYPE d3d12_device_CopyDescriptors(ID3D12Device *iface,
{
dst_idx = 0;
++dst_range_idx;
if (dst_range_idx >= dst_descriptor_range_count)
return;
dst = d3d12_desc_from_cpu_handle(dst_descriptor_range_offsets[dst_range_idx]);
dst_range_size = dst_descriptor_range_sizes ? dst_descriptor_range_sizes[dst_range_idx] : 1;
}
if (dst_range_idx >= dst_descriptor_range_count)
break;
d3d12_desc_copy(dst++, src++, device);
++dst_idx;