mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-27 23:20:40 +00:00
Fix #4462 - null deref in elf parser
This commit is contained in:
parent
3e5d281815
commit
ef317a026b
@ -725,6 +725,7 @@ static bool init_dynstr(struct Elf_(r_bin_elf_obj_t) *bin) {
|
||||
int i, r;
|
||||
const char *section_name = NULL;
|
||||
if (!bin || !bin->shdr) return false;
|
||||
if (!bin->shstrtab) return false;
|
||||
for (i = 0; i < bin->ehdr.e_shnum; ++i) {
|
||||
if (bin->shdr[i].sh_name > bin->shstrtab_size)
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user