mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-09 15:52:33 +00:00
* Fix segfault in r_bin_elf
This commit is contained in:
parent
508e4f596a
commit
acba7af2b1
@ -478,7 +478,16 @@ struct r_bin_elf_lib_t* Elf_(r_bin_elf_get_libs)(struct Elf_(r_bin_elf_obj_t) *b
|
||||
ret[k].last = 0;
|
||||
k++;
|
||||
}
|
||||
ret[k].last = 1;
|
||||
|
||||
if (k) {
|
||||
ret = realloc (ret, (k+1) * sizeof(struct r_bin_elf_lib_t));
|
||||
if (ret == NULL) {
|
||||
perror ("realloc (libs)");
|
||||
free (dyn);
|
||||
return NULL;
|
||||
}
|
||||
ret[k].last = 1;
|
||||
}
|
||||
free (dyn);
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user