projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix illegal memory access triggered when attempting to assemble a bogus i386 source...
[deliverable/binutils-gdb.git]
/
gas
/
config
/
tc-i386-intel.c
diff --git
a/gas/config/tc-i386-intel.c
b/gas/config/tc-i386-intel.c
index a12886d1b02979711acec765ab89c8be55c3973d..a2cd286572d3fd7ab712fd3d49eba06755feb537 100644
(file)
--- a/
gas/config/tc-i386-intel.c
+++ b/
gas/config/tc-i386-intel.c
@@
-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)
This page took
0.023623 seconds
and
4
git commands to generate.