mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
wolfcrypt/src/evp.c: fix wolfSSL_EVP_CIPHER_CTX_ctrl() null pointer passed to XMEMCPY(), found by sanitizers under gcc-11.2.1.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user