aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2010-03-30 23:20:25 +0000
committerH.J. Lu <hjl.tools@gmail.com>2010-03-30 23:20:25 +0000
commitb36562f693df03c18beb1b84ec991c2f2d0e5c1c (patch)
tree3b6d284ff36956225e40dbbdcae7152a5efc3497 /gas
parentf2bfad59579e17ba0aa3fd456bf2a52848c9b6ac (diff)
downloadgdb-b36562f693df03c18beb1b84ec991c2f2d0e5c1c.zip
gdb-b36562f693df03c18beb1b84ec991c2f2d0e5c1c.tar.gz
gdb-b36562f693df03c18beb1b84ec991c2f2d0e5c1c.tar.bz2
Use memmove to copy overlap memory.
2010-03-30 H.J. Lu <hongjiu.lu@intel.com> PR gas/11456 * input-scrub.c (input_scrub_next_buffer): Use memmove instead of memcpy to copy overlap memory.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/input-scrub.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 390447b..37d682f 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2010-03-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/11456
+ * input-scrub.c (input_scrub_next_buffer): Use memmove instead
+ of memcpy to copy overlap memory.
+
2010-03-25 Joseph Myers <joseph@codesourcery.com>
* Makefile.am (TARGET_CPU_CFILES): Add config/tc-tic6x.c.
diff --git a/gas/input-scrub.c b/gas/input-scrub.c
index a2cd31b..e1ff5cc 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