From dd060f01f68ee0e633e9cae24c4e565cda2032bd Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Thu, 13 Nov 2014 15:50:17 -0800 Subject: [PATCH] System/core: Use memmove Should use memmove when you expect overlap. Change-Id: I268a173db40a4be54232958e37aa8a03c2a885ee --- libutils/String8.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }