diff options
author | Pauli <paul.dale@oracle.com> | 2019-11-21 08:41:42 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2019-11-22 15:20:54 +1000 |
commit | a89befba602353ff2fc83ba7037eb91307b2cb21 (patch) | |
tree | bcc651efc0479933230f64b1605e82b447cd5ef4 /providers | |
parent | c676ff42b0ef35b9d04fdc5e9c71baff603a3dbf (diff) | |
download | openssl-a89befba602353ff2fc83ba7037eb91307b2cb21.tar.gz |
PROV: Avoid NULL dereference in SHA3 dup call.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10487)
Diffstat (limited to 'providers')
-rw-r--r-- | providers/implementations/digests/sha3_prov.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |