summaryrefslogtreecommitdiffstats
path: root/libutils
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-11-13 15:50:17 -0800
committerAndreas Gampe <agampe@google.com>2014-11-13 15:50:17 -0800
commitdd060f01f68ee0e633e9cae24c4e565cda2032bd (patch)
treecbabc21db45e5f92172acd1ab582d5d9e7bfe96a /libutils
parentb0a10b53eeeef6428bd034e3097391e9a7a4788b (diff)
downloadcore-dd060f01f68ee0e633e9cae24c4e565cda2032bd.tar.gz
core-dd060f01f68ee0e633e9cae24c4e565cda2032bd.tar.bz2
core-dd060f01f68ee0e633e9cae24c4e565cda2032bd.zip
System/core: Use memmove
Should use memmove when you expect overlap. Change-Id: I268a173db40a4be54232958e37aa8a03c2a885ee
Diffstat (limited to 'libutils')
-rw-r--r--libutils/String8.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libutils/String8.cpp b/libutils/String8.cpp
index 9092cbc99..3323b82a5 100644
--- a/libutils/String8.cpp
+++ b/libutils/String8.cpp
@@ -424,7 +424,7 @@ bool String8::removeAll(const char* other) {
next = len;
}
- memcpy(buf + tail, buf + index + skip, next - index - skip);
+ memmove(buf + tail, buf + index + skip, next - index - skip);
tail += next - index - skip;
index = next;
}