Skip to content

Commit

Permalink
Don't read out of bounds in descriptor heap when processing table
Browse files Browse the repository at this point in the history
  • Loading branch information
baldurk committed Apr 3, 2024
1 parent beefd5b commit 6a89135
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions renderdoc/driver/d3d12/d3d12_command_queue_wrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -819,10 +819,15 @@ void WrappedID3D12CommandQueue::ExecuteCommandListsInternal(UINT NumCommandLists
it != record->bakedCommands->cmdInfo->boundDescs.end(); ++it)
{
rdcpair<D3D12Descriptor *, UINT> &descRange = *it;
WrappedID3D12DescriptorHeap *heap = descRange.first->GetHeap();
D3D12Descriptor *end = heap->GetDescriptors() + heap->GetNumDescriptors();
for(UINT d = 0; d < descRange.second; ++d)
{
D3D12Descriptor *desc = descRange.first + d;

if(desc >= end)
break;

ResourceId id, id2;
FrameRefType ref = eFrameRef_Read;

Expand Down

0 comments on commit 6a89135

Please sign in to comment.