]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
bfd/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Wed, 20 Apr 2011 09:01:48 +0000 (09:01 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Wed, 20 Apr 2011 09:01:48 +0000 (09:01 +0000)
* elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Fix +1 overrun of
memmove elements.

bfd/ChangeLog
bfd/elf-bfd.h

index 5e0380016736b7f8957f1e276f3fdfa8c2c92a3a..6e8c81c7808032e79139b259646c7e48f281bfb0 100644 (file)
@@ -1,3 +1,8 @@
+2011-04-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Fix +1 overrun of
+       memmove elements.
+
 2011-03-26  John Marino  <binutils@marino.st>
 
        * config.bfd: Add x86_64-*-dragonfly*, fix i386-*-dragonfly*.
index 2e607f8ee661513c74cf2db3e1c45375766cbaef..73806dd9110d1fc7eb99f31741dae461c0448358 100644 (file)
@@ -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--;                                                   \