From: Jan Kratochvil Date: Wed, 20 Apr 2011 09:01:48 +0000 (+0000) Subject: bfd/ X-Git-Tag: binutils-2_21_1~98 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=41e010a1a9d944dbd97e2c87d6d5e2a75e1a5792;p=thirdparty%2Fbinutils-gdb.git bfd/ * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Fix +1 overrun of memmove elements. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 5e038001673..6e8c81c7808 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2011-04-20 Jan Kratochvil + + * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Fix +1 overrun of + memmove elements. + 2011-03-26 John Marino * config.bfd: Add x86_64-*-dragonfly*, fix i386-*-dragonfly*. diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 2e607f8ee66..73806dd9110 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -2380,7 +2380,7 @@ extern asection _bfd_elf_large_com_section; rel_hdr = _bfd_elf_single_rel_hdr (input_section); \ rel_hdr->sh_size -= rel_hdr->sh_entsize; \ \ - memmove (rel, rel + 1, (relend - rel) * sizeof (*rel)); \ + memmove (rel, rel + 1, (relend - rel - 1) * sizeof (*rel)); \ \ input_section->reloc_count--; \ relend--; \