1
0
Fork 0
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:
Cody P Schafer 2012-09-14 17:11:57 -07:00 committed by Arun Sharma
parent 64e8a3d909
commit 0abc36eb18

View file

@ -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);