mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-21 23:27:39 +01:00
ppc64: be explicit in access_reg range check
This commit is contained in:
parent
64e8a3d909
commit
0abc36eb18
1 changed files with 2 additions and 2 deletions
|
@ -141,9 +141,9 @@ access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val,
|
|||
unw_word_t *addr;
|
||||
ucontext_t *uc = arg;
|
||||
|
||||
if ((unsigned int) (reg - UNW_PPC64_F0) < 32)
|
||||
if (UNW_PPC64_F0 <= reg && reg <= UNW_PPC64_F31)
|
||||
goto badreg;
|
||||
if ((unsigned int) (reg - UNW_PPC64_V0) < 32)
|
||||
if (UNW_PPC64_V0 <= reg && reg <= UNW_PPC64_V31)
|
||||
goto badreg;
|
||||
|
||||
addr = uc_addr (uc, reg);
|
||||
|
|
Loading…
Reference in a new issue