summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2014-11-20 22:11:33 +0000
committermillert <millert@openbsd.org>2014-11-20 22:11:33 +0000
commit4d6c937d5b552af0cbe003748c5da1c9ebdc9c20 (patch)
treee3aa9f99209a40d92f3cfd4815f059a3cbdb6784
parentOne of these optimized stubs creates some incredibly subtle damage, (diff)
downloadwireguard-openbsd-4d6c937d5b552af0cbe003748c5da1c9ebdc9c20.tar.xz
wireguard-openbsd-4d6c937d5b552af0cbe003748c5da1c9ebdc9c20.zip
partial_where points into the buffer that begins with buffer_start
so we need to use memmove() to handle the overlap. Sourceware PR 11456 OK deraadt@
-rw-r--r--gnu/usr.bin/binutils-2.17/gas/input-scrub.c2
-rw-r--r--gnu/usr.bin/binutils/gas/input-scrub.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/gnu/usr.bin/binutils-2.17/gas/input-scrub.c b/gnu/usr.bin/binutils-2.17/gas/input-scrub.c
index 8562ee25dff..d876d14e914 100644
--- a/gnu/usr.bin/binutils-2.17/gas/input-scrub.c
+++ b/gnu/usr.bin/binutils-2.17/gas/input-scrub.c
@@ -332,7 +332,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);
}
diff --git a/gnu/usr.bin/binutils/gas/input-scrub.c b/gnu/usr.bin/binutils/gas/input-scrub.c
index 7a03965c967..8378240ed37 100644
--- a/gnu/usr.bin/binutils/gas/input-scrub.c
+++ b/gnu/usr.bin/binutils/gas/input-scrub.c
@@ -333,7 +333,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);
}