diff options
author | Alan Modra <amodra@bigpond.net.au> | 2009-03-25 01:37:18 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2009-03-25 01:37:18 +0000 |
commit | 742f4bf6e09badc176ce0a887b3b26c292392fc2 (patch) | |
tree | 30deb3e91be39016b34d33039aaefa6ada019663 | |
parent | 1ca599e3d4359d3216d65da821d016b16872e47c (diff) | |
download | binutils-redhat-742f4bf6e09badc176ce0a887b3b26c292392fc2.tar.gz |
* readelf.c (process_file_header): Don't report a corrupt string
table index if it is zero.
-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 e601e61a31..2338abbad2 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 c0c5beb5be..d1dea7b339 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); } |