mirror of https://github.com/wolfSSL/wolfssl.git
wolfcrypt/src/evp.c: fix wolfSSL_EVP_CIPHER_CTX_ctrl() null pointer passed to XMEMCPY(), found by sanitizers under gcc-11.2.1.
parent
930cc053d5
commit
aa05eb2879
|
@ -4817,6 +4817,7 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD* type)
|
||||||
/* OpenSSL increments the IV. Not sure why */
|
/* OpenSSL increments the IV. Not sure why */
|
||||||
IncCtr(ctx->iv, ctx->ivSz);
|
IncCtr(ctx->iv, ctx->ivSz);
|
||||||
/* Clear any leftover AAD. */
|
/* Clear any leftover AAD. */
|
||||||
|
if (ctx->gcmAuthIn != NULL)
|
||||||
XMEMSET(ctx->gcmAuthIn, 0, ctx->gcmAuthInSz);
|
XMEMSET(ctx->gcmAuthIn, 0, ctx->gcmAuthInSz);
|
||||||
ctx->gcmAuthInSz = 0;
|
ctx->gcmAuthInSz = 0;
|
||||||
ret = WOLFSSL_SUCCESS;
|
ret = WOLFSSL_SUCCESS;
|
||||||
|
|
Loading…
Reference in New Issue