mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
[master] replace memcpy() with memmove().
3698. [cleanup] Replaced all uses of memcpy() with memmove(). [RT #35120]
This commit is contained in:
@@ -318,7 +318,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_t *rdataset, isc_mem_t *mctx,
|
||||
*rawbuf++ |= (x[i].rdata.flags & DNS_RDATA_OFFLINE) ?
|
||||
DNS_RDATASLAB_OFFLINE : 0;
|
||||
}
|
||||
memcpy(rawbuf, x[i].rdata.data, x[i].rdata.length);
|
||||
memmove(rawbuf, x[i].rdata.data, x[i].rdata.length);
|
||||
rawbuf += x[i].rdata.length;
|
||||
}
|
||||
|
||||
@@ -711,7 +711,7 @@ dns_rdataslab_merge(unsigned char *oslab, unsigned char *nslab,
|
||||
tstart = isc_mem_get(mctx, tlength);
|
||||
if (tstart == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
memcpy(tstart, nslab, reservelen);
|
||||
memmove(tstart, nslab, reservelen);
|
||||
tcurrent = tstart + reservelen;
|
||||
#if DNS_RDATASET_FIXED
|
||||
offsetbase = tcurrent;
|
||||
@@ -790,7 +790,7 @@ dns_rdataslab_merge(unsigned char *oslab, unsigned char *nslab,
|
||||
#if DNS_RDATASET_FIXED
|
||||
tcurrent += 2; /* fill in later */
|
||||
#endif
|
||||
memcpy(tcurrent, data, length);
|
||||
memmove(tcurrent, data, length);
|
||||
tcurrent += length;
|
||||
oadded++;
|
||||
if (oadded < ocount) {
|
||||
@@ -817,7 +817,7 @@ dns_rdataslab_merge(unsigned char *oslab, unsigned char *nslab,
|
||||
#if DNS_RDATASET_FIXED
|
||||
tcurrent += 2; /* fill in later */
|
||||
#endif
|
||||
memcpy(tcurrent, data, length);
|
||||
memmove(tcurrent, data, length);
|
||||
tcurrent += length;
|
||||
nadded++;
|
||||
if (nadded < ncount) {
|
||||
@@ -949,7 +949,7 @@ dns_rdataslab_subtract(unsigned char *mslab, unsigned char *sslab,
|
||||
tstart = isc_mem_get(mctx, tlength);
|
||||
if (tstart == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
memcpy(tstart, mslab, reservelen);
|
||||
memmove(tstart, mslab, reservelen);
|
||||
tcurrent = tstart + reservelen;
|
||||
#if DNS_RDATASET_FIXED
|
||||
offsetbase = tcurrent;
|
||||
@@ -1005,7 +1005,7 @@ dns_rdataslab_subtract(unsigned char *mslab, unsigned char *sslab,
|
||||
#if DNS_RDATASET_FIXED
|
||||
offsettable[order] = tcurrent - offsetbase;
|
||||
#endif
|
||||
memcpy(tcurrent, mrdatabegin, length);
|
||||
memmove(tcurrent, mrdatabegin, length);
|
||||
tcurrent += length;
|
||||
}
|
||||
dns_rdata_reset(&mrdata);
|
||||
|
Reference in New Issue
Block a user