Skip to content

Commit

Permalink
Fix null deref in bin.symbols ##crash
Browse files Browse the repository at this point in the history
* Reported by cnitlrt via huntr.dev
  • Loading branch information
radare committed Feb 21, 2022
1 parent 27fe803 commit 515e592
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libr/bin/p/bin_symbols.c
@@ -1,4 +1,4 @@
/* radare - LGPL - Copyright 2018 - pancake */
/* radare - LGPL - Copyright 2018-2022 - pancake */

#include <r_types.h>
#include <r_util.h>
Expand Down Expand Up @@ -361,6 +361,9 @@ static RList *symbols(RBinFile *bf) {
bool found = false;
for (i = 0; i < element->hdr->n_lined_symbols; i++) {
RCoreSymCacheElementSymbol *sym = (RCoreSymCacheElementSymbol *)&element->lined_symbols[i];
if (!sym) {
break;
}
ht_uu_find (hash, sym->paddr, &found);
if (found) {
continue;
Expand Down

0 comments on commit 515e592

Please sign in to comment.