evp.c: in EvpCipherAesGCM(), make sure ctx->gcmAuthIn is non-null before clearing it; fix whitespace.

This commit is contained in:
Daniel Pouzzner
2022-06-01 10:29:40 -05:00
parent 81cd1e652e
commit b212853bce
2 changed files with 10 additions and 8 deletions

View File

@@ -5864,7 +5864,9 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD* type)
* Clear any leftover AAD on final (final is when src is
* NULL).
*/
if (ctx->gcmAuthIn != NULL) {
XMEMSET(ctx->gcmAuthIn, 0, ctx->gcmAuthInSz);
}
ctx->gcmAuthInSz = 0;
}
if (ret == 0) {