Skip to content

Commit

Permalink
Fix segfault in ELF parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Mar 13, 2013
1 parent 352dde3 commit 8999267
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libr/bin/format/elf/elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,8 +740,8 @@ struct r_bin_elf_reloc_t* Elf_(r_bin_elf_get_relocs)(struct Elf_(r_bin_elf_obj_t
perror ("malloc (reloc)");
return NULL;
}
if (sym)
for (j = 0; j < nrel; j++) {
j = 0;
if (sym) for (; j < nrel; j++) {
idx = ELF_R_SYM (rel[j].r_info);
if (idx < nsym) {
if (sym[idx].st_name > bin->strtab_section->sh_size) {
Expand Down

0 comments on commit 8999267

Please sign in to comment.