Check if ax[ft] argument is valid before showing xrefs to 0 ##anal

This commit is contained in:
Sergi Àlvarez i Capilla 2021-11-02 18:48:50 +01:00 committed by pancake
parent e8c96eabb3
commit 13f9ca23a2

View File

@ -8281,6 +8281,10 @@ static bool cmd_anal_refs(RCore *core, const char *input) {
char *space = strchr (input, ' ');
if (space) {
addr = r_num_math (core->num, space + 1);
if (core->num->nc.errors > 0) {
eprintf ("Invalid argument.\n");
break;
}
} else {
addr = core->offset;
}
@ -8458,6 +8462,10 @@ static bool cmd_anal_refs(RCore *core, const char *input) {
char *space = strchr (input, ' ');
if (space) {
addr = r_num_math (core->num, space + 1);
if (core->num->nc.errors > 0) {
eprintf ("Invalid argument.\n");
break;
}
} else {
addr = core->offset;
}