Skip to content

Commit

Permalink
EVP shake_ctrl(): add missing NULL evp_ctx check
Browse files Browse the repository at this point in the history
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #22390)
  • Loading branch information
DDvO committed Oct 17, 2023
1 parent 72a99ef commit 410c80d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crypto/evp/legacy_sha.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ static int sha1_int_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void *p2)

static int shake_ctrl(EVP_MD_CTX *evp_ctx, int cmd, int p1, void *p2)
{
KECCAK1600_CTX *ctx = evp_ctx->md_data;
KECCAK1600_CTX *ctx;

if (evp_ctx == NULL)
return 0;
ctx = evp_ctx->md_data;

switch (cmd) {
case EVP_MD_CTRL_XOF_LEN:
Expand Down

0 comments on commit 410c80d

Please sign in to comment.