aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2021-07-22 13:03:16 +0200
committerJan Beulich <jbeulich@suse.com>2021-07-22 13:03:16 +0200
commitbac11f2cfe7913ef4c37af608454451e27f78eff (patch)
tree954a895ffa1607a8e70e4ea3e88beeeeb4975fcb /opcodes
parent3fa77affb00ef5d9bcb7f080750625749cdfa611 (diff)
downloadgdb-bac11f2cfe7913ef4c37af608454451e27f78eff.zip
gdb-bac11f2cfe7913ef4c37af608454451e27f78eff.tar.gz
gdb-bac11f2cfe7913ef4c37af608454451e27f78eff.tar.bz2
x86-64: properly bounds-check %bnd<N> in OP_G()
The restriction to %bnd0-%bnd3 requires to also check REX.R is clear, just like OP_E_Register() also includes REX.B in its check.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/i386-dis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index e95d2ef..203dcef 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -11966,7 +11966,7 @@ OP_G (int bytemode, int sizeflag)
oappend (names64[modrm.reg + add]);
break;
case bnd_mode:
- if (modrm.reg > 0x3)
+ if (modrm.reg + add > 0x3)
{
oappend ("(bad)");
return;