[openssl] master update

Dr. Paul Dale pauli at openssl.org
Mon Jul 5 02:45:17 UTC 2021


The branch master has been updated
       via  0a02c81f8173e0c5d554bd16daa68b7594f4cbd8 (commit)
      from  f7546162d406be1f93bb39fb5a968521162b9acf (commit)


- Log -----------------------------------------------------------------
commit 0a02c81f8173e0c5d554bd16daa68b7594f4cbd8
Author: Tomas Mraz <tomas at openssl.org>
Date:   Fri Jul 2 15:45:09 2021 +0200

    Coverity #1486687: fix potential dereference of NULL keymgmt
    
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15986)

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

Summary of changes:
 crypto/encode_decode/decoder_pkey.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/crypto/encode_decode/decoder_pkey.c b/crypto/encode_decode/decoder_pkey.c
index 719bd17b2f..edbea4face 100644
--- a/crypto/encode_decode/decoder_pkey.c
+++ b/crypto/encode_decode/decoder_pkey.c
@@ -126,9 +126,9 @@ static int decoder_construct_pkey(OSSL_DECODER_INSTANCE *decoder_inst,
         /* To allow it to be freed further down */
         if (!EVP_KEYMGMT_up_ref(keymgmt))
             return 0;
-    } else {
-        keymgmt = EVP_KEYMGMT_fetch(data->libctx,
-                                    data->object_type, data->propq);
+    } else if ((keymgmt = EVP_KEYMGMT_fetch(data->libctx,
+                                            data->object_type,
+                                            data->propq)) != NULL) {
         keymgmt_prov = EVP_KEYMGMT_get0_provider(keymgmt);
     }
 


More information about the openssl-commits mailing list