Fix #11838 - Use op.val in aar and honor asm.var.submin ##anal

This commit is contained in:
radare 2018-10-19 02:08:54 +02:00 committed by GitHub
parent 3c74828055
commit ff640a3ff6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3193,6 +3193,7 @@ R_API int r_core_anal_search_xrefs(RCore *core, ut64 from, ut64 to, int rad) {
}
r_cons_break_push (NULL, NULL);
at = from;
st64 asm_var_submin = r_config_get_i (core->config, "asm.var.submin");
while (at < to && !r_cons_is_breaked ()) {
int i = 0, ret = bsz;
if (!r_io_is_valid_offset (core->io, at, R_PERM_X)) {
@ -3222,6 +3223,10 @@ R_API int r_core_anal_search_xrefs(RCore *core, ut64 from, ut64 to, int rad) {
break;
}
// find references
if ((st64)op.val > asm_var_submin && op.val != UT64_MAX && op.val != UT32_MAX) {
found_xref (core, op.addr, op.val, R_ANAL_REF_TYPE_DATA, count, rad, cfg_debug, cfg_anal_strings);
}
// find references
if (op.ptr && op.ptr != UT64_MAX && op.ptr != UT32_MAX) {
found_xref (core, op.addr, op.ptr, R_ANAL_REF_TYPE_DATA, count, rad, cfg_debug, cfg_anal_strings);
}