Skip to content

Commit

Permalink
Use memmove instead of memcpy for overlapping areas
Browse files Browse the repository at this point in the history
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Edgar Toernig authored and Junio C Hamano committed Oct 31, 2006
1 parent 8d63d95 commit 173a9cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imap-send.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 173a9cb

Please sign in to comment.