mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-05 20:50:06 +00:00
Fix #12532 - null deref in axff
This commit is contained in:
parent
e6874e1d88
commit
4caa01dd2c
@ -342,6 +342,7 @@ static RList *fcn_get_refs(RAnalFunction *fcn, HtUP *ht) {
|
||||
}
|
||||
|
||||
R_API RList *r_anal_fcn_get_refs(RAnal *anal, RAnalFunction *fcn) {
|
||||
r_return_val_if_fail (anal && fcn, NULL);
|
||||
return fcn_get_refs (fcn, anal->dict_refs);
|
||||
}
|
||||
|
||||
|
@ -5825,13 +5825,17 @@ static bool cmd_anal_refs(RCore *core, const char *input) {
|
||||
RAnalFunction * fcn = r_anal_get_fcn_in (core->anal, addr, 0);
|
||||
RListIter *iter;
|
||||
RAnalRef *refi;
|
||||
RList *refs = r_anal_fcn_get_refs (core->anal, fcn);
|
||||
r_list_foreach (refs, iter, refi) {
|
||||
RFlagItem *f = r_flag_get_at (core->flags, refi->addr, true);
|
||||
const char *name = f ? f->name: "";
|
||||
r_cons_printf ("%c 0x%08"PFMT64x" 0x%08"PFMT64x" %s\n",
|
||||
refi->type == R_ANAL_REF_TYPE_CALL?'C':'J',
|
||||
refi->at, refi->addr, name);
|
||||
if (fcn) {
|
||||
RList *refs = r_anal_fcn_get_refs (core->anal, fcn);
|
||||
r_list_foreach (refs, iter, refi) {
|
||||
RFlagItem *f = r_flag_get_at (core->flags, refi->addr, true);
|
||||
const char *name = f ? f->name: "";
|
||||
r_cons_printf ("%c 0x%08"PFMT64x" 0x%08"PFMT64x" %s\n",
|
||||
refi->type == R_ANAL_REF_TYPE_CALL?'C':'J',
|
||||
refi->at, refi->addr, name);
|
||||
}
|
||||
} else {
|
||||
eprintf ("Cannot find any function\n");
|
||||
}
|
||||
} else { // "axf"
|
||||
ut8 buf[12];
|
||||
|
Loading…
Reference in New Issue
Block a user