mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 22:45:39 +00:00
[master] replace memcpy() with memmove().
3698. [cleanup] Replaced all uses of memcpy() with memmove(). [RT #35120]
This commit is contained in:
@@ -420,7 +420,7 @@ isc__buffer_putstr(isc_buffer_t *b, const char *source) {
|
||||
REQUIRE(l <= isc_buffer_availablelength(b));
|
||||
|
||||
cp = isc_buffer_used(b);
|
||||
memcpy(cp, source, l);
|
||||
memmove(cp, source, l);
|
||||
b->used += l;
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ isc_buffer_copyregion(isc_buffer_t *b, const isc_region_t *r) {
|
||||
available = isc_buffer_availablelength(b);
|
||||
if (r->length > available)
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(base, r->base, r->length);
|
||||
memmove(base, r->base, r->length);
|
||||
b->used += r->length;
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
|
Reference in New Issue
Block a user