summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2014-12-29 22:54:28 +0000
committerpfg <pfg@FreeBSD.org>2014-12-29 22:54:28 +0000
commit80b8a49df45350ef1df84cb477766defc817ae56 (patch)
treeac150beb4f52dbd021663ca58a69bf09da39c2ae
parent52bfb3cdd3930dfa76b124495d3a3937f5721aba (diff)
downloadFreeBSD-src-80b8a49df45350ef1df84cb477766defc817ae56.zip
FreeBSD-src-80b8a49df45350ef1df84cb477766defc817ae56.tar.gz
MFC r276228:
gas: use memmove instead of bogus memcpy. partial_where points into the buffer that begins with buffer_start so we need to use memmove() to handle the overlap. Fixes Sourceware-PR 11456. Obtained from: OpenBSD (CVS rev. 1.2)
-rw-r--r--contrib/binutils/gas/input-scrub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/binutils/gas/input-scrub.c b/contrib/binutils/gas/input-scrub.c
index 5698a6d..6eb0189 100644
--- a/contrib/binutils/gas/input-scrub.c
+++ b/contrib/binutils/gas/input-scrub.c
@@ -335,7 +335,7 @@ input_scrub_next_buffer (char **bufp)
if (partial_size)
{
- memcpy (buffer_start + BEFORE_SIZE, partial_where,
+ memmove (buffer_start + BEFORE_SIZE, partial_where,
(unsigned int) partial_size);
memcpy (buffer_start + BEFORE_SIZE, save_source, AFTER_SIZE);
}
OpenPOWER on IntegriCloud