diff options
author | Alan Modra <amodra@gmail.com> | 2018-08-22 10:04:58 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2018-08-22 15:37:00 +0930 |
commit | e8a648884df318b3c6be170ecdc9c42f79e56bd0 (patch) | |
tree | 160fb2d933c7f25c7b48f9fe8620c060a73b508a /binutils/ChangeLog | |
parent | ac1e2e51c0927676dc87f0e090c6d8e4c42f297e (diff) | |
download | gdb-e8a648884df318b3c6be170ecdc9c42f79e56bd0.zip gdb-e8a648884df318b3c6be170ecdc9c42f79e56bd0.tar.gz gdb-e8a648884df318b3c6be170ecdc9c42f79e56bd0.tar.bz2 |
Correct readelf e_shstrndx range check
Fixes a bogus out of range error:
Number of section headers: 0 (210016)
Section header string table index: 1 <corrupt: out of range>
Caused due to e_shnum remaining as zero rather than being updated to
the value from section_header[0].sh_info at the point where we range
check e_shstrndx.
* readelf.c (process_file_header): Assign updated values from
section_header[0] fields to e_phnum, e_shnum and e_shstrndx
during printing of header. Correct e_shstrndx range check.
Remove unnecessary casts and use %u rather than %ld for
unsigned int header fields. Don't print a random %lx when
reporting an unknown EI_VERSION.
Diffstat (limited to 'binutils/ChangeLog')
-rw-r--r-- | binutils/ChangeLog | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 97e3540..69ca9aa 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,12 @@ +2018-08-22 Alan Modra <amodra@gmail.com> + + * readelf.c (process_file_header): Assign updated values from + section_header[0] fields to e_phnum, e_shnum and e_shstrndx + during printing of header. Correct e_shstrndx range check. + Remove unnecessary casts and use %u rather than %ld for + unsigned int header fields. Don't print a random %lx when + reporting an unknown EI_VERSION. + 2018-08-21 Nick Clifton <nickc@redhat.com> * MAINTAINERS: Note that Arnold Metselaar has retired as the z80 |