From 2f84fcfa2f5fed81003bd207595e7e4b1c02ac51 Mon Sep 17 00:00:00 2001 From: pancake Date: Wed, 30 Oct 2024 03:06:56 +0100 Subject: [PATCH] Fix null deref assert in RList.join() for iiccx --- libr/core/cmd_info.inc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libr/core/cmd_info.inc.c b/libr/core/cmd_info.inc.c index ee95460820..c910fe941c 100644 --- a/libr/core/cmd_info.inc.c +++ b/libr/core/cmd_info.inc.c @@ -422,10 +422,13 @@ static void cmd_iic2(RCore *core, int mode, const char *symname) { RFlagItem *item = get_flag_for_import (core, value); if (item) { RList *refs = uniqrefs_for (core, item->offset); - if (!rrrr) { + if (refs && rrrr) { + r_list_join (rrrr, refs); + } else if (refs && !rrrr) { + rrrr = refs; + } else if (!rrrr) { rrrr = r_list_newf (free); } - r_list_join (rrrr, refs); } else { R_LOG_WARN ("Cannot resolve %s", value); }