summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gampe2014-11-13 17:50:17 -0600
committerAndreas Gampe2014-11-13 17:50:17 -0600
commitdd060f01f68ee0e633e9cae24c4e565cda2032bd (patch)
treecbabc21db45e5f92172acd1ab582d5d9e7bfe96a /libutils/String8.cpp
parentb0a10b53eeeef6428bd034e3097391e9a7a4788b (diff)
downloadplatform-system-core-dd060f01f68ee0e633e9cae24c4e565cda2032bd.tar.gz
platform-system-core-dd060f01f68ee0e633e9cae24c4e565cda2032bd.tar.xz
platform-system-core-dd060f01f68ee0e633e9cae24c4e565cda2032bd.zip
System/core: Use memmove
Should use memmove when you expect overlap. Change-Id: I268a173db40a4be54232958e37aa8a03c2a885ee
Diffstat (limited to 'libutils/String8.cpp')
-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) {
424 next = len; 424 next = len;
425 } 425 }
426 426
427 memcpy(buf + tail, buf + index + skip, next - index - skip); 427 memmove(buf + tail, buf + index + skip, next - index - skip);
428 tail += next - index - skip; 428 tail += next - index - skip;
429 index = next; 429 index = next;
430 } 430 }