mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-06 13:29:46 +00:00
Make ARM/MIPS have less duplicate gadgets
also remove "invalid" gadgets
This commit is contained in:
parent
1093c7528a
commit
dafe3c42a2
@ -549,6 +549,10 @@ static RList* construct_rop_gadget(RCore *core, ut64 addr, ut8 *buf, int idx, co
|
||||
r_asm_set_pc (core->assembler, addr);
|
||||
if (!r_asm_disassemble (core->assembler, &asmop, buf+idx, 15))
|
||||
goto ret;
|
||||
if (!strncasecmp (asmop.buf_asm, "invalid", strlen("invalid"))) {
|
||||
valid = R_FALSE;
|
||||
goto ret;
|
||||
}
|
||||
|
||||
hit = r_core_asm_hit_new ();
|
||||
hit->addr = addr;
|
||||
@ -791,6 +795,9 @@ static int r_core_search_rop(RCore *core, ut64 from, ut64 to, int opt, const cha
|
||||
r_cons_newline ();
|
||||
}
|
||||
}
|
||||
if (increment != 1) {
|
||||
i = next;
|
||||
}
|
||||
}
|
||||
}
|
||||
free (buf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user