From 067c0c38e7ce3a2a86ab9ffa94802fbd3f4b03c0 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Thu, 6 Nov 2014 13:01:59 -0800 Subject: [PATCH] [master] s/mempcy/memmove/ --- bin/named/server.c | 2 +- lib/isc/random.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/named/server.c b/bin/named/server.c index 1158ef4ad8..c650b3d79a 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -9411,7 +9411,7 @@ generate_salt(unsigned char *salt, size_t saltlen) { for (i = 0; i < n; i++) isc_random_get(&rnd.rnd32[i]); - memcpy(salt, rnd.rnd, saltlen); + memmove(salt, rnd.rnd, saltlen); r.base = rnd.rnd; r.length = (unsigned int) saltlen; diff --git a/lib/isc/random.c b/lib/isc/random.c index 424e65b04a..f7f7c7cdbf 100644 --- a/lib/isc/random.c +++ b/lib/isc/random.c @@ -311,8 +311,8 @@ chacha_getuint16(isc_rng_t *rng) { if (rng->have < sizeof(val)) chacha_rekey(rng, NULL, 0); - memcpy(&val, rng->buffer + CHACHA_BUFFERSIZE - rng->have, - sizeof(val)); + memmove(&val, rng->buffer + CHACHA_BUFFERSIZE - rng->have, + sizeof(val)); /* Clear the copied region. */ memset(rng->buffer + CHACHA_BUFFERSIZE - rng->have, 0, sizeof(val));