diff --git a/wolfcrypt/src/aes.c b/wolfcrypt/src/aes.c index 3bba8e0b29..ea0d320c48 100644 --- a/wolfcrypt/src/aes.c +++ b/wolfcrypt/src/aes.c @@ -13803,6 +13803,10 @@ static WARN_UNUSED_RESULT int AesSivCipher( } #endif + if (aes != NULL) { + XMEMSET(&aes, 0, sizeof(Aes)); + } + if (ret == 0) { ret = wc_AesInit(aes, NULL, INVALID_DEVID); if (ret != 0) {