[openssl] OpenSSL_1_1_1-stable update

Dr. Paul Dale pauli at openssl.org
Thu Mar 18 11:17:10 UTC 2021


The branch OpenSSL_1_1_1-stable has been updated
       via  81198bf323ea9deda907714170d329ca7d2ff01f (commit)
      from  8129ac6ac4c0ca3a488c225cde580ede7dabe874 (commit)


- Log -----------------------------------------------------------------
commit 81198bf323ea9deda907714170d329ca7d2ff01f
Author: Pauli <ppzgs1 at gmail.com>
Date:   Wed Mar 17 11:40:13 2021 +1000

    modes: fix coverity 1449851: overlapping memory copy
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14584)
    
    (cherry picked from commit b875e0e820b07420429ebb90724ed28686a98853)

-----------------------------------------------------------------------

Summary of changes:
 crypto/modes/cbc128.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crypto/modes/cbc128.c b/crypto/modes/cbc128.c
index 4595b0f502..78949c1ed7 100644
--- a/crypto/modes/cbc128.c
+++ b/crypto/modes/cbc128.c
@@ -115,7 +115,8 @@ void CRYPTO_cbc128_decrypt(const unsigned char *in, unsigned char *out,
                 out += 16;
             }
         }
-        memcpy(ivec, iv, 16);
+        if (ivec != iv)
+            memcpy(ivec, iv, 16);
     } else {
         if (STRICT_ALIGNMENT &&
             ((size_t)in | (size_t)out | (size_t)ivec) % sizeof(size_t) != 0) {


More information about the openssl-commits mailing list