From 69827de738cb905ea4a8a78375711a56cc3e6836 Mon Sep 17 00:00:00 2001 From: John Foley Date: Sat, 12 Sep 2015 00:11:23 +0100 Subject: Use memmove instead of memcpy. PR#4036 Reviewed-by: Tim Hudson Reviewed-by: Stephen Henson --- crypto/modes/wrap128.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/modes/wrap128.c b/crypto/modes/wrap128.c index 4dcaf03..3849783 100644 --- a/crypto/modes/wrap128.c +++ b/crypto/modes/wrap128.c @@ -76,7 +76,7 @@ size_t CRYPTO_128_wrap(void *key, const unsigned char *iv, return 0; A = B; t = 1; - memcpy(out + 8, in, inlen); + memmove(out + 8, in, inlen); if (!iv) iv = default_iv; @@ -113,7 +113,7 @@ size_t CRYPTO_128_unwrap(void *key, const unsigned char *iv, A = B; t = 6 * (inlen >> 3); memcpy(A, in, 8); - memcpy(out, in + 8, inlen); + memmove(out, in + 8, inlen); for (j = 0; j < 6; j++) { R = out + inlen - 8; for (i = 0; i < inlen; i += 8, t--, R -= 8) { -- 1.7.12.1