diff options
author | Alan Modra <amodra@gmail.com> | 2009-03-25 01:37:18 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2009-03-25 01:37:18 +0000 |
commit | 15ba6505cb90d69cbfb101cc5a96c398b714a1a2 (patch) | |
tree | 4ad5d4746cea3e559bc243f25ce546be309205f9 /binutils | |
parent | 6d4796192d5ba3425f757344a9d67d47a9e768d9 (diff) | |
download | gdb-15ba6505cb90d69cbfb101cc5a96c398b714a1a2.zip gdb-15ba6505cb90d69cbfb101cc5a96c398b714a1a2.tar.gz gdb-15ba6505cb90d69cbfb101cc5a96c398b714a1a2.tar.bz2 |
* readelf.c (process_file_header): Don't report a corrupt string
table index if it is zero.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/readelf.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index e601e61..2338abb 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2009-03-25 Ryan Mansfield <rmansfield@qnx.com> + + * readelf.c (process_file_header): Don't report a corrupt string + table index if it is zero. + 2009-03-19 H.J. Lu <hongjiu.lu@intel.com> * dwarf.c (dwarf_regnames): Moved before frame_need_space. diff --git a/binutils/readelf.c b/binutils/readelf.c index c0c5beb..d1dea7b 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -3205,7 +3205,8 @@ process_file_header (void) if (section_headers != NULL && elf_header.e_shstrndx == (SHN_XINDEX & 0xffff)) printf (" (%u)", section_headers[0].sh_link); - else if (elf_header.e_shstrndx >= elf_header.e_shnum) + else if (elf_header.e_shstrndx != SHN_UNDEF + && elf_header.e_shstrndx >= elf_header.e_shnum) printf (" <corrupt: out of range>"); putc ('\n', stdout); } |