From c1785c55f7c68dfe28d610753cf82e455487b351 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Mon, 18 Jan 2021 17:09:07 +0100 Subject: [PATCH] r600/sb: fix boundary assert for mem-instruction decoding Signed-off-by: Gert Wollny Part-of: --- src/gallium/drivers/r600/sb/sb_bc_decoder.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/sb/sb_bc_decoder.cpp b/src/gallium/drivers/r600/sb/sb_bc_decoder.cpp index 4a7f82ba753..b04cb73e22a 100644 --- a/src/gallium/drivers/r600/sb/sb_bc_decoder.cpp +++ b/src/gallium/drivers/r600/sb/sb_bc_decoder.cpp @@ -540,7 +540,8 @@ int bc_decoder::decode_fetch_mem(unsigned & i, bc_fetch& bc) { uint32_t dw2 = dw[i+2]; i += 4; // MEM instructions align to 4 words boundaries - assert(i < ndw); + + assert(i <= ndw); MEM_RD_WORD0_R7EGCM w0(dw0); bc.elem_size = w0.get_ELEM_SIZE();