diff options
-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; } |