Fix null deref in anj

This commit is contained in:
pancake 2021-03-30 01:49:01 +02:00
parent bd0b0be77b
commit 58923119f9

View File

@ -1209,7 +1209,7 @@ static int cmd_an(RCore *core, bool use_json, const char *name) {
r_cons_printf ("0x%" PFMT64x "\n", tgt_addr);
} else {
pj_o (pj);
pj_ks (pj, "name", name);
pj_ks (pj, "name", name? name: "");
pj_ks (pj, "type", "address");
pj_kn (pj, "offset", tgt_addr);
pj_end (pj);