mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
[master] replace memcpy() with memmove().
3698. [cleanup] Replaced all uses of memcpy() with memmove(). [RT #35120]
This commit is contained in:
@@ -234,7 +234,7 @@ str_totext(const char *source, isc_buffer_t *target) {
|
||||
if (l > region.length)
|
||||
return (ISC_R_NOSPACE);
|
||||
|
||||
memcpy(region.base, source, l);
|
||||
memmove(region.base, source, l);
|
||||
isc_buffer_add(target, l);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
@@ -246,7 +246,7 @@ mem_tobuffer(isc_buffer_t *target, void *base, unsigned int length) {
|
||||
isc_buffer_availableregion(target, &tr);
|
||||
if (length > tr.length)
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(tr.base, base, length);
|
||||
memmove(tr.base, base, length);
|
||||
isc_buffer_add(target, length);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
Reference in New Issue
Block a user