Don't crash and burn when a section doesn't have a name (possibly invalid
ELF file string table). Just try the next section instead of calling strcmp
on NULL.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
+2014-05-27 Mark Wielaard <mjw@redhat.com>
+
+ * readelf.c (print_debug): Skip section if name is NULL.
+
2014-05-26 Mark Wielaard <mjw@redhat.com>
* readelf.c (handle_relocs_rela): Print header like handle_relocs_rel
/ sizeof (debug_sections[0]));
const char *name = elf_strptr (ebl->elf, shstrndx,
shdr->sh_name);
- int n;
+ if (name == NULL)
+ continue;
+ int n;
for (n = 0; n < ndebug_sections; ++n)
if (strcmp (name, debug_sections[n].name) == 0
#if USE_ZLIB