Merge pull request #4706 from douzzer/20211227-fix-null-pointer-wolfSSL_EVP_CIPHER_CTX_ctrl

wolfcrypt/src/evp.c: fix wolfSSL_EVP_CIPHER_CTX_ctrl() null pointer…
This commit is contained in:
JacobBarthelmeh
2021-12-27 20:08:43 -07:00
committed by GitHub

View File

@@ -4817,7 +4817,8 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD* type)
/* OpenSSL increments the IV. Not sure why */
IncCtr(ctx->iv, ctx->ivSz);
/* Clear any leftover AAD. */
XMEMSET(ctx->gcmAuthIn, 0, ctx->gcmAuthInSz);
if (ctx->gcmAuthIn != NULL)
XMEMSET(ctx->gcmAuthIn, 0, ctx->gcmAuthInSz);
ctx->gcmAuthInSz = 0;
ret = WOLFSSL_SUCCESS;
break;