Use memmove instead of memcpy for overlapping areas
Signed-off-by: Junio C Hamano <junkio@cox.net>
Edgar Toernig committed
Oct 30, 2006 at 17:39 UTC
173a9cbe7031bc3574b3f41cb2d2375cf959ff2a
1 file changed
+1
-1
imap-send.c
+1
-1
@@ -272,7 +272,7 @@ buffer_gets( buffer_t * b, char **s )
272
n = b->bytes - start;
273
274
if (n)
275
- memcpy( b->buf, b->buf + start, n );
275
+ memmove(b->buf, b->buf + start, n);
276
b->offset -= start;
277
b->bytes = n;
278
start = 0;