1
0
mirror of https://github.com/git/git.git synced 2024-11-19 03:23:56 +01:00

Use memmove instead of memcpy for overlapping areas

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Edgar Toernig 2006-10-30 17:39:17 -08:00 committed by Junio C Hamano
parent 8d63d95f29
commit 173a9cbe70

@ -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;