PROV: Avoid NULL dereference in SHA3 dup call.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10487)
This commit is contained in:
Pauli 2019-11-21 08:41:42 +10:00
parent c676ff42b0
commit a89befba60

View File

@ -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;
}