mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-27 15:10:53 +00:00
Another fix for xrefs
This commit is contained in:
parent
8b7d4b033c
commit
1c7b576f1b
@ -58,6 +58,10 @@ R_API int r_anal_xrefs_set (RAnal *anal, const RAnalRefType type,
|
||||
char key[32];
|
||||
if (!anal || !DB)
|
||||
return R_FALSE;
|
||||
// unknown refs should not be stored. seems wrong
|
||||
if (type == R_ANAL_REF_TYPE_NULL) {
|
||||
return R_FALSE;
|
||||
}
|
||||
XREFKEY (key, sizeof (key), "ref", type, from);
|
||||
sdb_array_add_num (DB, key, to, 0);
|
||||
XREFKEY (key, sizeof (key), "xref", type, to);
|
||||
@ -105,7 +109,7 @@ R_API RList *r_anal_xrefs_get (RAnal *anal, ut64 to) {
|
||||
r_anal_xrefs_from (anal, list, "xref", R_ANAL_REF_TYPE_CALL, to);
|
||||
r_anal_xrefs_from (anal, list, "xref", R_ANAL_REF_TYPE_DATA, to);
|
||||
r_anal_xrefs_from (anal, list, "xref", R_ANAL_REF_TYPE_STRING, to);
|
||||
if (r_list_length (list)<1) {
|
||||
if (r_list_empty (list)) {
|
||||
r_list_free (list);
|
||||
list = NULL;
|
||||
}
|
||||
|
@ -805,7 +805,7 @@ R_API int r_core_anal_fcn(RCore *core, ut64 at, ut64 from, int reftype, int dept
|
||||
r_list_append (fcn->xrefs, ref);
|
||||
#endif
|
||||
// XXX this is creating dupped entries in the refs list with invalid reftypes, wtf?
|
||||
//r_anal_xrefs_set (core->anal, reftype, from, at);
|
||||
r_anal_xrefs_set (core->anal, reftype, from, at);
|
||||
}
|
||||
// XXX: this is wrong. See CID 1134565
|
||||
r_anal_fcn_insert (core->anal, fcn);
|
||||
|
Loading…
Reference in New Issue
Block a user