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 /gdb | |
parent | ac1e2e51c0927676dc87f0e090c6d8e4c42f297e (diff) | |
download | fsf-binutils-gdb-e8a648884df318b3c6be170ecdc9c42f79e56bd0.zip fsf-binutils-gdb-e8a648884df318b3c6be170ecdc9c42f79e56bd0.tar.gz fsf-binutils-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 'gdb')
0 files changed, 0 insertions, 0 deletions