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:
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;
|
||||
|
Loading…
Reference in New Issue
Block a user