Print this page
3450 elfdump crashes on non-Solaris/Linux objects

@@ -2223,11 +2223,10 @@
         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;

@@ -4737,11 +4736,11 @@
         Elf_Scn         *scn;
         Ehdr            *ehdr;
         size_t          ndx, shstrndx, shnum, phnum;
         Shdr            *shdr;
         Cache           *cache;
-        VERSYM_STATE    versym;
+        VERSYM_STATE    versym = { 0 };
         int             ret = 0;
         int             addr_align;
 
         if ((ehdr = elf_getehdr(elf)) == NULL) {
                 failure(file, MSG_ORIG(MSG_ELF_GETEHDR));