mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2025-04-18 02:22:16 +02:00
Fix a warning message on i386
Without this, we may be accessing data beyond the array bounds.
This commit is contained in:
parent
3067acf172
commit
d7089547e2
1 changed files with 1 additions and 0 deletions
|
@ -691,6 +691,7 @@ apply_reg_state (struct dwarf_cursor *c, struct dwarf_reg_state *rs)
|
||||||
stack-pointer wasn't saved, popping the CFA implicitly pops
|
stack-pointer wasn't saved, popping the CFA implicitly pops
|
||||||
the stack-pointer as well. */
|
the stack-pointer as well. */
|
||||||
if ((rs->reg[DWARF_CFA_REG_COLUMN].val == UNW_TDEP_SP)
|
if ((rs->reg[DWARF_CFA_REG_COLUMN].val == UNW_TDEP_SP)
|
||||||
|
&& (UNW_TDEP_SP < ARRAY_SIZE(rs->reg))
|
||||||
&& (rs->reg[UNW_TDEP_SP].where == DWARF_WHERE_SAME))
|
&& (rs->reg[UNW_TDEP_SP].where == DWARF_WHERE_SAME))
|
||||||
cfa = c->cfa;
|
cfa = c->cfa;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue