Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix oobread in symbols header parsing ##bin
  • Loading branch information
trufae committed Mar 24, 2022
1 parent 9bcc98f commit d4ce40b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libr/bin/p/bin_symbols.c
Expand Up @@ -181,14 +181,17 @@ static RBinSymbol *bin_symbol_from_symbol(RCoreSymCacheElement *element, RCoreSy

static RCoreSymCacheElement *parseDragons(RBinFile *bf, RBuffer *buf, int off, int bits, R_OWN char *file_name) {
D eprintf ("Dragons at 0x%x\n", off);
ut64 size = r_buf_size (buf);
st64 size = r_buf_size (buf);
if (off >= size) {
return NULL;
}
size -= off;
if (!size) {
return NULL;
}
if (size < 32) {
return NULL;
}
ut8 *b = malloc (size);
if (!b) {
return NULL;
Expand Down

0 comments on commit d4ce40b

Please sign in to comment.