1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-05 09:14:03 +00:00

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
This commit is contained in:
Pedro F. Giffuni 2014-12-26 03:03:41 +00:00
parent 5547f9fb51
commit 32d0bb7e1b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276228

View File

@ -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);
}