From 8db7a0f7af3dcda799cc35e455a52635e3ad7e8f Mon Sep 17 00:00:00 2001 From: seyko Date: Fri, 22 Apr 2016 18:21:09 +0300 Subject: [PATCH] Source and destination overlap in memcpy, cstr_cat (tccpp.c:322) This code is from "Improve hash performance" --- tccpp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tccpp.c b/tccpp.c index 026e62a..b991944 100644 --- a/tccpp.c +++ b/tccpp.c @@ -319,7 +319,7 @@ ST_FUNC void cstr_cat(CString *cstr, const char *str, int len) size = cstr->size + len; if (size > cstr->size_allocated) cstr_realloc(cstr, size); - memcpy(((unsigned char *)cstr->data) + cstr->size, str, len); + memmove(((unsigned char *)cstr->data) + cstr->size, str, len); cstr->size = size; }