mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-19 04:12:46 +00:00
fix segfault in vsnprintf on 32 bit systems examining a PPC ELF (#8075)
* fix segfault in vsnprintf on 32 bit systems On a 32-bit x86 computer, examining a PowerPC ELF with the "aa" command caused a segfault in vsnprintf. The %llx (PFMT64x) format attempts to get the next 64 bits from the stack. This will consume the cmask32 and ARG(0) values. The following "%s" will cause a segfault if the next 32 bits is not pointing to readable memory. I doubt this is the best fix. Maybe libr/include/r_types.h should be changed? You guys know better. * cast instead of duplicating code * fix white space
This commit is contained in:
parent
1820908da3
commit
66b5808475
@ -623,7 +623,7 @@ static int analop(RAnal *a, RAnalOp *op, ut64 addr, const ut8 *buf, int len) {
|
||||
break;
|
||||
case PPC_INS_CLRLWI:
|
||||
op->type = R_ANAL_OP_TYPE_AND;
|
||||
esilprintf (op, "%s,0x%"PFMT64x",&,%s,=", ARG (1), cmask32 (ARG (2), "31"), ARG (0));
|
||||
esilprintf (op, "%s,0x%"PFMT64x",&,%s,=", ARG (1), (ut64) cmask32 (ARG (2), "31"), ARG (0));
|
||||
break;
|
||||
case PPC_INS_RLWINM:
|
||||
op->type = R_ANAL_OP_TYPE_ROL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user