From: Edgar Toernig Date: Tue, 31 Oct 2006 01:39:17 +0000 (-0800) Subject: Use memmove instead of memcpy for overlapping areas X-Git-Tag: v1.4.3.4~11 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=173a9cbe7031bc3574b3f41cb2d2375cf959ff2a;p=git.git Use memmove instead of memcpy for overlapping areas Signed-off-by: Junio C Hamano --- diff --git a/imap-send.c b/imap-send.c index 16804ab28..a6a65680e 100644 --- a/imap-send.c +++ b/imap-send.c @@ -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;