diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2014-11-20 22:11:34 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2014-11-20 22:11:34 +0000 |
commit | 605803be7cdbd79b1bae78b1667bac063cfbe464 (patch) | |
tree | 2cff8bbdeefcfd04942b2c3c23b16f60433b9201 /gnu | |
parent | 2bf8c4b7d0f1e744374c7c7294480e337026f582 (diff) |
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@
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/binutils-2.17/gas/input-scrub.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gas/input-scrub.c | 2 |
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); } |