backport: memmove for overlapping mem copies.
This commit is contained in:
parent
1af2cfde4f
commit
2074a7ab03
|
@ -376,7 +376,7 @@ buffer_gets( buffer_t * b, char **s )
|
||||||
n = b->bytes - start;
|
n = b->bytes - start;
|
||||||
|
|
||||||
if (n)
|
if (n)
|
||||||
memcpy( b->buf, b->buf + start, n );
|
memmove( b->buf, b->buf + start, n );
|
||||||
b->offset -= start;
|
b->offset -= start;
|
||||||
b->bytes = n;
|
b->bytes = n;
|
||||||
start = 0;
|
start = 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user