diff options
author | Alan Modra <amodra@gmail.com> | 2025-01-17 14:41:39 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2025-01-17 16:07:48 +1030 |
commit | 7976c00c183f700e60031c67b3cc49875323c02e (patch) | |
tree | a4d69523655e21c957ee66beb4c9ad115b859dc6 | |
parent | 006ccbe61ad0b61622a0934dd607f37620afc30a (diff) | |
download | binutils-7976c00c183f700e60031c67b3cc49875323c02e.zip binutils-7976c00c183f700e60031c67b3cc49875323c02e.tar.gz binutils-7976c00c183f700e60031c67b3cc49875323c02e.tar.bz2 |
buffer overflow in mmix_elf_relocate_section
* elf64-mmix.c (mmix_elf_relocate_section): Correct size of
relocs shuffled by memmove.
-rw-r--r-- | bfd/elf64-mmix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c index c377222..5bb6fee 100644 --- a/bfd/elf64-mmix.c +++ b/bfd/elf64-mmix.c @@ -1496,7 +1496,7 @@ mmix_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, /* Shift this reloc to the end of the relocs to maintain the r_offset sorted reloc order. */ relcpy = *rel; - memmove (rel, rel + 1, (char *) relend - (char *) rel); + memmove (rel, rel + 1, (char *) relend - (char *) (rel + 1)); relend[-1] = relcpy; /* Back up one reloc, or else we'd skip the next reloc |