Skip to content

Commit

Permalink
Fix #2706 & #2705
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarofe authored and radare committed Jun 4, 2015
1 parent b6720d8 commit 7c2fd08
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 @@ -291,7 +291,7 @@ static int Elf_(r_bin_elf_init_dynamic_section) (struct Elf_(r_bin_elf_obj_t) *b
free (dyn);
return R_FALSE;
}
strtab = (char *)calloc (1, strsize);
strtab = (char *)calloc (1, strsize+1);
if (!strtab){
free (dyn);
return R_FALSE;
Expand Down Expand Up @@ -1180,7 +1180,7 @@ struct r_bin_elf_lib_t* Elf_(r_bin_elf_get_libs)(struct Elf_(r_bin_elf_obj_t) *b
struct r_bin_elf_lib_t *ret = NULL;
int j, k;

if (!bin || !bin->phdr || !bin->dyn_buf || !bin->strtab || *bin->strtab == '0')
if (!bin || !bin->phdr || !bin->dyn_buf || !bin->strtab || *(bin->strtab+1) == '0')
return NULL;

for (j = 0, k = 0; j < bin->dyn_entries; j++)
Expand Down

0 comments on commit 7c2fd08

Please sign in to comment.