[openssl] OpenSSL_1_1_1-stable update

Dr. Paul Dale pauli at openssl.org
Wed Aug 18 06:13:03 UTC 2021


The branch OpenSSL_1_1_1-stable has been updated
       via  9d868840b821fddf895e3bf6b589ecf6be7b1b13 (commit)
      from  bc8c36272067f8443f875164831ce3a5a739df3f (commit)


- Log -----------------------------------------------------------------
commit 9d868840b821fddf895e3bf6b589ecf6be7b1b13
Author: Pauli <pauli at openssl.org>
Date:   Tue Aug 17 13:19:32 2021 +1000

    pkcs12: check for zero length digest to avoid division by zero
    
    Fixes #16331
    
    Reviewed-by: Dmitry Belyavskiy <beldmit at gmail.com>
    Reviewed-by: Kurt Roeckx <kurt at roeckx.be>
    (Merged from https://github.com/openssl/openssl/pull/16333)

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

Summary of changes:
 crypto/pkcs12/p12_key.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/pkcs12/p12_key.c b/crypto/pkcs12/p12_key.c
index ab31a61295..b814f79216 100644
--- a/crypto/pkcs12/p12_key.c
+++ b/crypto/pkcs12/p12_key.c
@@ -101,7 +101,7 @@ int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt,
 #endif
     v = EVP_MD_block_size(md_type);
     u = EVP_MD_size(md_type);
-    if (u < 0 || v <= 0)
+    if (u <= 0 || v <= 0)
         goto err;
     D = OPENSSL_malloc(v);
     Ai = OPENSSL_malloc(u);


More information about the openssl-commits mailing list