mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-03 19:59:09 +00:00
Honor Anal.Archinfo.Align for search.align in aav to bring back some true negatives
This commit is contained in:
parent
0828e5d429
commit
7e5c635e08
@ -5872,7 +5872,8 @@ static void cmd_anal_aav(RCore *core, const char *input) {
|
||||
bool is_debug = r_config_get_i (core->config, "cfg.debug");
|
||||
|
||||
// pre
|
||||
seti ("search.align", 4);
|
||||
int archAlign = r_anal_archinfo (core->anal, R_ANAL_ARCHINFO_ALIGN);
|
||||
seti ("search.align", archAlign);
|
||||
|
||||
int vsize = 4; // 32bit dword
|
||||
if (core->assembler->bits == 64) {
|
||||
|
@ -2620,10 +2620,10 @@ R_API int r_core_search_value_in_range(RCore *core, RAddrInterval search_itv, ut
|
||||
}
|
||||
if (match) {
|
||||
bool isValidMatch = true;
|
||||
if (value % align) {
|
||||
if (align && (value % align)) {
|
||||
// ignored .. unless we are analyzing arm/thumb and lower bit is 1
|
||||
isValidMatch = false;
|
||||
if (maybeThumb && value & 1) {
|
||||
if (maybeThumb && (value & 1)) {
|
||||
isValidMatch = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user