mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-25 18:23:29 +08:00
Fix illegal memory access triggered when attempting to assemble a bogus i386 source file.
PR 24538 * config/tc-i386-intel.c (i386_intel_simplify_register): Reject illegal register numbers.
This commit is contained in:
parent
37d0d09177
commit
35015cd193
@ -1,3 +1,9 @@
|
||||
2019-05-14 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 24538
|
||||
* config/tc-i386-intel.c (i386_intel_simplify_register): Reject
|
||||
illegal register numbers.
|
||||
|
||||
2019-05-10 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 24538
|
||||
|
@ -270,6 +270,12 @@ i386_intel_simplify_register (expressionS *e)
|
||||
else
|
||||
reg_num = e->X_md - 1;
|
||||
|
||||
if (reg_num < 0 || reg_num >= (int) i386_regtab_size)
|
||||
{
|
||||
as_bad (_("invalid register number"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!intel_state.in_bracket)
|
||||
{
|
||||
if (i.op[this_operand].regs)
|
||||
|
Loading…
Reference in New Issue
Block a user