From: Florian Krohm Date: Wed, 1 Jul 2015 11:30:02 +0000 (+0000) Subject: Fix condition to avoid that decode[] is indexed out-of-bounds. X-Git-Tag: svn/VALGRIND_3_11_0^2~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=701fe22709c284e2803e49d56fa0a6b2265cd4e7;p=thirdparty%2Fvalgrind.git Fix condition to avoid that decode[] is indexed out-of-bounds. Spotted by Coverity. git-svn-id: svn://svn.valgrind.org/vex/trunk@3159 --- diff --git a/VEX/priv/host_tilegx_defs.c b/VEX/priv/host_tilegx_defs.c index 92ca2c7c54..6d4edf9e8c 100644 --- a/VEX/priv/host_tilegx_defs.c +++ b/VEX/priv/host_tilegx_defs.c @@ -1306,7 +1306,7 @@ Int decode_and_display ( tilegx_bundle_bits *p, Int count, ULong pc ) Int n, k, bundled = 0; - for(k = 0; decode[k].opcode && (k mnemonic != TILEGX_OPC_FNOP) bundled++; @@ -1317,7 +1317,7 @@ Int decode_and_display ( tilegx_bundle_bits *p, Int count, ULong pc ) vex_printf("{ "); n = bundled; - for(k = 0; decode[k].opcode && (k mnemonic == TILEGX_OPC_FNOP) continue;