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/readelf.c | |
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/readelf.c')
-rw-r--r-- | binutils/readelf.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |