[openssl] master update

Dr. Paul Dale pauli at openssl.org
Fri Nov 22 05:22:01 UTC 2019


The branch master has been updated
       via  a89befba602353ff2fc83ba7037eb91307b2cb21 (commit)
       via  c676ff42b0ef35b9d04fdc5e9c71baff603a3dbf (commit)
      from  3c659415465a29d41cdfb6866683af8690de1527 (commit)


- Log -----------------------------------------------------------------
commit a89befba602353ff2fc83ba7037eb91307b2cb21
Author: Pauli <paul.dale at oracle.com>
Date:   Thu Nov 21 08:41:42 2019 +1000

    PROV: Avoid NULL dereference in SHA3 dup call.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/10487)

commit c676ff42b0ef35b9d04fdc5e9c71baff603a3dbf
Author: Pauli <paul.dale at oracle.com>
Date:   Thu Nov 21 06:47:57 2019 +1000

    PROV: check for memory allocation failure in digest _dupctx.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/10487)

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

Summary of changes:
 providers/common/include/prov/digestcommon.h  | 3 ++-
 providers/implementations/digests/sha3_prov.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/providers/common/include/prov/digestcommon.h b/providers/common/include/prov/digestcommon.h
index 868cbbf79f..e5b76ff49f 100644
--- a/providers/common/include/prov/digestcommon.h
+++ b/providers/common/include/prov/digestcommon.h
@@ -49,7 +49,8 @@ static void *name##_dupctx(void *ctx)                                          \
 {                                                                              \
     CTX *in = (CTX *)ctx;                                                      \
     CTX *ret = OPENSSL_malloc(sizeof(*ret));                                   \
-    *ret = *in;                                                                \
+    if (ret != NULL)                                                           \
+        *ret = *in;                                                            \
     return ret;                                                                \
 }                                                                              \
 static OSSL_OP_digest_final_fn name##_internal_final;                          \
diff --git a/providers/implementations/digests/sha3_prov.c b/providers/implementations/digests/sha3_prov.c
index 251039e992..44471959a7 100644
--- a/providers/implementations/digests/sha3_prov.c
+++ b/providers/implementations/digests/sha3_prov.c
@@ -241,7 +241,8 @@ static void *keccak_dupctx(void *ctx)
     KECCAK1600_CTX *in = (KECCAK1600_CTX *)ctx;
     KECCAK1600_CTX *ret = OPENSSL_malloc(sizeof(*ret));
 
-    *ret = *in;
+    if (ret != NULL)
+        *ret = *in;
     return ret;
 }
 


More information about the openssl-commits mailing list