Author: pfg
Date: Mon Dec 29 22:55:54 2014
New Revision: 276385
URL: https://svnweb.freebsd.org/changeset/base/276385
Log:
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)
Modified:
stable/9/contrib/binutils/gas/input-scrub.c
Directory Properties:
stable/9/contrib/binutils/ (props changed)
Modified: stable/9/contrib/binutils/gas/input-scrub.c
==============================================================================
--- stable/9/contrib/binutils/gas/input-scrub.c Mon Dec 29 22:54:28 2014
(r276384)
+++ stable/9/contrib/binutils/gas/input-scrub.c Mon Dec 29 22:55:54 2014
(r276385)
@@ -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);
}
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "[email protected]"