diff options
author | Nick Clifton <nickc@redhat.com> | 2014-11-27 12:19:10 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2014-11-27 12:19:10 +0000 |
commit | 1036838a771b96ad9428e8fc7ecc45d3d8e056ce (patch) | |
tree | b2908f515505401f6bada294ce7a2ca23797c5d5 /bfd/elf.c | |
parent | 608ce2f3c8b1fb309f50b6426389282ec6031323 (diff) | |
download | gdb-1036838a771b96ad9428e8fc7ecc45d3d8e056ce.zip gdb-1036838a771b96ad9428e8fc7ecc45d3d8e056ce.tar.gz gdb-1036838a771b96ad9428e8fc7ecc45d3d8e056ce.tar.bz2 |
Fixes a few more memory access violations exposed by fuzzed binaries.
PR binutils/17512
* ecoff.c (_bfd_ecoff_slurp_symbol_table): Warn about and correct
a discrepancy between the isymMax and ifdMax values in the
symbolic header.
* elf.c (_bfd_elf_print_private_bfd_data): Fix the range check
scanning the external dynamic entries.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1254,7 +1254,9 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg) extdyn = dynbuf; extdynend = extdyn + s->size; - for (; extdyn < extdynend; extdyn += extdynsize) + /* PR 17512: file: id:000006,sig:06,src:000000,op:flip4,pos:5664. + Fix range check. */ + for (; extdyn <= (extdynend - extdynsize); extdyn += extdynsize) { Elf_Internal_Dyn dyn; const char *name = ""; |