[openssl] master update

tmraz at fedoraproject.org tmraz at fedoraproject.org
Tue Jan 26 14:11:25 UTC 2021


The branch master has been updated
       via  5764c3522c417fc775a78df4529e7a6f93379de8 (commit)
      from  b897b353dff8138aa838bae9766ecd3de8c03280 (commit)


- Log -----------------------------------------------------------------
commit 5764c3522c417fc775a78df4529e7a6f93379de8
Author: Tomas Mraz <tmraz at fedoraproject.org>
Date:   Wed Nov 13 11:04:08 2019 +0100

    krb5kdf: Do not dereference NULL ctx when allocation fails
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/13953)

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

Summary of changes:
 providers/implementations/kdfs/krb5kdf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/providers/implementations/kdfs/krb5kdf.c b/providers/implementations/kdfs/krb5kdf.c
index cdf8a15415..c719dbf259 100644
--- a/providers/implementations/kdfs/krb5kdf.c
+++ b/providers/implementations/kdfs/krb5kdf.c
@@ -63,8 +63,10 @@ static void *krb5kdf_new(void *provctx)
     if (!ossl_prov_is_running())
         return NULL;
 
-    if ((ctx = OPENSSL_zalloc(sizeof(*ctx))) == NULL)
+    if ((ctx = OPENSSL_zalloc(sizeof(*ctx))) == NULL) {
         ERR_raise(ERR_LIB_PROV, ERR_R_MALLOC_FAILURE);
+        return NULL;
+    }
     ctx->provctx = provctx;
     return ctx;
 }


More information about the openssl-commits mailing list