Skip to content

Commit

Permalink
Fix oobread crash in the analysis loop with corrupted ELFs (tests_649…
Browse files Browse the repository at this point in the history
…28) ##crash

Reported by giantbranch of NSFOCUS TIANJI Lab
  • Loading branch information
trufae committed Oct 30, 2021
1 parent 59a9dfb commit 4aff1bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libr/core/canal.c
Expand Up @@ -831,7 +831,7 @@ static bool __core_anal_fcn(RCore *core, ut64 at, ut64 from, int reftype, int de
const RList *syms = r_bin_get_symbols (core->bin);
ut64 baddr = r_config_get_i (core->config, "bin.baddr");
r_list_foreach (syms, iter, sym) {
if ((sym->paddr + baddr) == fcn->addr && !strcmp (sym->type, R_BIN_TYPE_FUNC_STR)) {
if (sym->type && (sym->paddr + baddr) == fcn->addr && !strcmp (sym->type, R_BIN_TYPE_FUNC_STR)) {
free (new_name);
new_name = r_str_newf ("sym.%s", sym->name);
break;
Expand Down

0 comments on commit 4aff1bb

Please sign in to comment.