summaryrefslogtreecommitdiff
path: root/lib/dns/tkey.c
diff options
context:
space:
mode:
authorInternet Software Consortium, Inc <@isc.org>2014-02-11 09:00:42 -0700
committerInternet Software Consortium, Inc <@isc.org>2014-02-11 09:00:42 -0700
commit8af21b710f34092dcd08abdc13e7971553b616d2 (patch)
treef88f42a2ea6576f512958360ee049636e18046b0 /lib/dns/tkey.c
parent892b23e1710e6770b12c3aa952eb2cdc9ab4bc1b (diff)
downloadbind9-8af21b710f34092dcd08abdc13e7971553b616d2.tar.gz
9.9.5rc1
Diffstat (limited to 'lib/dns/tkey.c')
-rw-r--r--lib/dns/tkey.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/dns/tkey.c b/lib/dns/tkey.c
index 161c1880..11b4f49e 100644
--- a/lib/dns/tkey.c
+++ b/lib/dns/tkey.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2013 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -152,7 +152,7 @@ add_rdata_to_list(dns_message_t *msg, dns_name_t *name, dns_rdata_t *rdata,
dns_rdata_toregion(rdata, &r);
RETERR(isc_buffer_allocate(msg->mctx, &tmprdatabuf, r.length));
isc_buffer_availableregion(tmprdatabuf, &newr);
- memcpy(newr.base, r.base, r.length);
+ memmove(newr.base, r.base, r.length);
dns_rdata_fromregion(newrdata, rdata->rdclass, rdata->type, &newr);
dns_message_takebuffer(msg, &tmprdatabuf);
@@ -252,12 +252,12 @@ compute_secret(isc_buffer_t *shared, isc_region_t *queryrandomness,
if (r.length < sizeof(digests) || r.length < r2.length)
return (ISC_R_NOSPACE);
if (r2.length > sizeof(digests)) {
- memcpy(r.base, r2.base, r2.length);
+ memmove(r.base, r2.base, r2.length);
for (i = 0; i < sizeof(digests); i++)
r.base[i] ^= digests[i];
isc_buffer_add(secret, r2.length);
} else {
- memcpy(r.base, digests, sizeof(digests));
+ memmove(r.base, digests, sizeof(digests));
for (i = 0; i < r2.length; i++)
r.base[i] ^= r2.base[i];
isc_buffer_add(secret, sizeof(digests));
@@ -534,7 +534,7 @@ process_gsstkey(dns_name_t *name, dns_rdata_tkey_t *tkeyin,
goto failure;
}
tkeyout->keylen = isc_buffer_usedlength(outtoken);
- memcpy(tkeyout->key, isc_buffer_base(outtoken),
+ memmove(tkeyout->key, isc_buffer_base(outtoken),
isc_buffer_usedlength(outtoken));
isc_buffer_free(&outtoken);
} else {
@@ -544,7 +544,7 @@ process_gsstkey(dns_name_t *name, dns_rdata_tkey_t *tkeyin,
goto failure;
}
tkeyout->keylen = tkeyin->keylen;
- memcpy(tkeyout->key, tkeyin->key, tkeyin->keylen);
+ memmove(tkeyout->key, tkeyin->key, tkeyin->keylen);
}
tkeyout->error = dns_rcode_noerror;