[openssl] master update

Dr. Paul Dale pauli at openssl.org
Wed Aug 18 06:15:07 UTC 2021


The branch master has been updated
       via  9f81ef9c0b6f3f9b3a091c5c40af52fb3f8556e3 (commit)
      from  46ac83eaf30efb676d12583080216f354951e0ae (commit)


- Log -----------------------------------------------------------------
commit 9f81ef9c0b6f3f9b3a091c5c40af52fb3f8556e3
Author: Pauli <pauli at openssl.org>
Date:   Tue Aug 17 13:17:17 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/16332)

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

Summary of changes:
 providers/implementations/kdfs/pkcs12kdf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/providers/implementations/kdfs/pkcs12kdf.c b/providers/implementations/kdfs/pkcs12kdf.c
index 0ca83dd243..2037b458c8 100644
--- a/providers/implementations/kdfs/pkcs12kdf.c
+++ b/providers/implementations/kdfs/pkcs12kdf.c
@@ -64,7 +64,7 @@ static int pkcs12kdf_derive(const unsigned char *pass, size_t passlen,
     }
     vi = EVP_MD_get_block_size(md_type);
     ui = EVP_MD_get_size(md_type);
-    if (ui < 0 || vi <= 0) {
+    if (ui <= 0 || vi <= 0) {
         ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_DIGEST_SIZE);
         goto end;
     }


More information about the openssl-commits mailing list