We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4753e1c commit e4f4274Copy full SHA for e4f4274
1 file changed
wolfcrypt/src/aes.c
@@ -14033,6 +14033,13 @@ static WARN_UNUSED_RESULT int AesSivCipher(
14033
}
14034
14035
14036
+#ifndef WOLFSSL_SMALL_STACK
14037
+ /* make aes has heap hint and isAllocated initialized for cleanup below */
14038
+ if (ret != 0) {
14039
+ XMEMSET(aes, 0, sizeof(Aes));
14040
+ }
14041
+#endif
14042
+
14043
if (ret == 0 && dataSz > 0) {
14044
sivTmp[12] &= 0x7f;
14045
sivTmp[8] &= 0x7f;
@@ -14066,7 +14073,6 @@ static WARN_UNUSED_RESULT int AesSivCipher(
14066
14073
if (aes != NULL)
14067
14074
#endif
14068
14075
{
14069
- aes->isAllocated = 0;
14070
14076
wc_AesFree(aes);
14071
14077
#ifdef WOLFSSL_SMALL_STACK
14072
14078
XFREE(aes, NULL, DYNAMIC_TYPE_AES);
0 commit comments