mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-21 05:05:44 +00:00
Protect against out-of-bounds array access
This commit is contained in:
@@ -3492,7 +3492,8 @@ State State::GetNext(GlobalState &global, State quad[4]) const
|
||||
{
|
||||
const DXBC::ASMDecl &decl = dxbc->GetDeclaration(i);
|
||||
|
||||
if(decl.declaration == OPCODE_DCL_SAMPLER && decl.operand.indices == op.operands[3].indices)
|
||||
if(decl.declaration == OPCODE_DCL_SAMPLER && op.operands.size() > 3 &&
|
||||
decl.operand.indices == op.operands[3].indices)
|
||||
{
|
||||
if(decl.samplerMode == SAMPLER_MODE_DEFAULT)
|
||||
sampler = "SamplerState s";
|
||||
|
||||
Reference in New Issue
Block a user