aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf-bfd.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 5a15a6c..fec3d20 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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-04-20 Alan Modra <amodra@gmail.com>
* libbfd.c (bfd_log2): Do return rounded up value.
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 39c7de6..735d2b5 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -2405,7 +2405,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--; \