The branch master has been updated
       via  02c163ea8936d75c7334d81d86c2a713dea40371 (commit)
      from  c3612970465d0a13f2fc5b47bc28ca18516a699d (commit)


- Log -----------------------------------------------------------------
commit 02c163ea8936d75c7334d81d86c2a713dea40371
Author: Pauli <[email protected]>
Date:   Wed Jul 31 07:19:33 2019 +1000

    Check for NULL return from zalloc in dh_dupctx.
    
    Reviewed-by: Bernd Edlinger <[email protected]>
    (Merged from https://github.com/openssl/openssl/pull/9485)

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

Summary of changes:
 providers/common/exchange/dh_exch.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/providers/common/exchange/dh_exch.c 
b/providers/common/exchange/dh_exch.c
index b4bfd5f419..62041daab3 100644
--- a/providers/common/exchange/dh_exch.c
+++ b/providers/common/exchange/dh_exch.c
@@ -106,6 +106,8 @@ static void *dh_dupctx(void *vpdhctx)
     PROV_DH_CTX *dstctx;
 
     dstctx = OPENSSL_zalloc(sizeof(*srcctx));
+    if (dstctx == NULL)
+        return NULL;
 
     *dstctx = *srcctx;
     if (dstctx->dh != NULL && !DH_up_ref(dstctx->dh)) {

Reply via email to