aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 346eea3..1b9b7fa 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1721,14 +1721,9 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg)
extdynsize = get_elf_backend_data (abfd)->s->sizeof_dyn;
swap_dyn_in = get_elf_backend_data (abfd)->s->swap_dyn_in;
- extdyn = dynbuf;
- /* PR 17512: file: 6f427532. */
- if (s->size < extdynsize)
- goto error_return;
- extdynend = extdyn + s->size;
- /* PR 17512: file: id:000006,sig:06,src:000000,op:flip4,pos:5664.
- Fix range check. */
- for (; extdyn <= (extdynend - extdynsize); extdyn += extdynsize)
+ for (extdyn = dynbuf, extdynend = dynbuf + s->size;
+ (size_t) (extdynend - extdyn) >= extdynsize;
+ extdyn += extdynsize)
{
Elf_Internal_Dyn dyn;
const char *name = "";