diff options
author | pfg <pfg@FreeBSD.org> | 2014-12-26 03:03:41 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2014-12-26 03:03:41 +0000 |
commit | 44fbda221f2bd72bdd40409f43f2d0fc562515a6 (patch) | |
tree | bad3568d515d2912f60a9e7a0aec26c582041c46 /contrib/binutils | |
parent | b35fa78035b36127059dfd1cbfa140f5eac0a3b1 (diff) | |
download | FreeBSD-src-44fbda221f2bd72bdd40409f43f2d0fc562515a6.zip FreeBSD-src-44fbda221f2bd72bdd40409f43f2d0fc562515a6.tar.gz |
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.
Sourceware-PR 11456.
Obtained from: OpenBSD (CVS rev. 1.2)
MFC after: 3 days
Diffstat (limited to 'contrib/binutils')
-rw-r--r-- | contrib/binutils/gas/input-scrub.c | 2 |
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); } |