Print this page
3450 elfdump crashes on non-Solaris/Linux objects
*** 2223,2233 ****
GElf_Word cnt;
Cache *verdef_cache = NULL, *verneed_cache = NULL;
/* Gather information about the version sections */
- bzero(versym, sizeof (*versym));
versym->max_verndx = 1;
for (cnt = 1; cnt < shnum; cnt++) {
Cache *_cache = &cache[cnt];
Shdr *shdr = _cache->c_shdr;
Dyn *dyn;
--- 2223,2232 ----
*** 4737,4747 ****
Elf_Scn *scn;
Ehdr *ehdr;
size_t ndx, shstrndx, shnum, phnum;
Shdr *shdr;
Cache *cache;
! VERSYM_STATE versym;
int ret = 0;
int addr_align;
if ((ehdr = elf_getehdr(elf)) == NULL) {
failure(file, MSG_ORIG(MSG_ELF_GETEHDR));
--- 4736,4746 ----
Elf_Scn *scn;
Ehdr *ehdr;
size_t ndx, shstrndx, shnum, phnum;
Shdr *shdr;
Cache *cache;
! VERSYM_STATE versym = { 0 };
int ret = 0;
int addr_align;
if ((ehdr = elf_getehdr(elf)) == NULL) {
failure(file, MSG_ORIG(MSG_ELF_GETEHDR));