* readelf.c (process_section_groups): If there are no section
headers do not scan for section groups.
(process_note_sections): Likewise for note sections.
+2012-01-26 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/13622
+ * readelf.c (process_section_groups): If there are no section
+ headers do not scan for section groups.
+ (process_note_sections): Likewise for note sections.
+
2012-01-20 Tristan Gingold <gingold@adacore.com>
* od-macho.c (OPT_SEG_SPLIT_INFO): New macro.
if (section_headers == NULL)
{
error (_("Section headers are not available!\n"));
- abort ();
+ /* PR 13622: This can happen with a corrupt ELF header. */
+ return 0;
}
section_headers_groups = (struct group **) calloc (elf_header.e_shnum,
int res = 1;
for (i = 0, section = section_headers;
- i < elf_header.e_shnum;
+ i < elf_header.e_shnum && section != NULL;
i++, section++)
if (section->sh_type == SHT_NOTE)
res &= process_corefile_note_segment (file,