OSDN Git Service

Use memmove instead of memcpy for overlapping areas
authorEdgar Toernig <froese@gmx.de>
Tue, 31 Oct 2006 01:39:17 +0000 (17:39 -0800)
committerJunio C Hamano <junkio@cox.net>
Tue, 31 Oct 2006 01:39:17 +0000 (17:39 -0800)
Signed-off-by: Junio C Hamano <junkio@cox.net>
imap-send.c

index 16804ab..a6a6568 100644 (file)
@@ -272,7 +272,7 @@ buffer_gets( buffer_t * b, char **s )
                                n = b->bytes - start;
 
                                if (n)
-                                       memcpy( b->buf, b->buf + start, n );
+                                       memmove(b->buf, b->buf + start, n);
                                b->offset -= start;
                                b->bytes = n;
                                start = 0;