From: H.J. Lu Date: Tue, 30 Mar 2010 23:20:25 +0000 (+0000) Subject: Use memmove to copy overlap memory. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b36562f693df03c18beb1b84ec991c2f2d0e5c1c;p=binutils-gdb.git Use memmove to copy overlap memory. 2010-03-30 H.J. Lu PR gas/11456 * input-scrub.c (input_scrub_next_buffer): Use memmove instead of memcpy to copy overlap memory. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 390447b3318..37d682f32f3 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2010-03-30 H.J. Lu + + PR gas/11456 + * input-scrub.c (input_scrub_next_buffer): Use memmove instead + of memcpy to copy overlap memory. + 2010-03-25 Joseph Myers * Makefile.am (TARGET_CPU_CFILES): Add config/tc-tic6x.c. diff --git a/gas/input-scrub.c b/gas/input-scrub.c index a2cd31b3f6e..e1ff5cc0a50 100644 --- a/gas/input-scrub.c +++ b/gas/input-scrub.c @@ -343,8 +343,8 @@ input_scrub_next_buffer (char **bufp) if (partial_size) { - memcpy (buffer_start + BEFORE_SIZE, partial_where, - (unsigned int) partial_size); + memmove (buffer_start + BEFORE_SIZE, partial_where, + (unsigned int) partial_size); memcpy (buffer_start + BEFORE_SIZE, save_source, AFTER_SIZE); } limit = input_file_give_next_buffer (buffer_start