Skip to content

Commit dbc209d

Browse files
author
Andras Fekete
committed
Always initialize 'decryptedKey'
Warning 750167.5627928
1 parent 7069a18 commit dbc209d

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

wolfcrypt/src/pkcs7.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11830,10 +11830,6 @@ WOLFSSL_API int wc_PKCS7_DecodeAuthEnvelopedData(PKCS7* pkcs7, byte* in,
1183011830
}
1183111831
#endif
1183211832

11833-
#ifndef WOLFSSL_SMALL_STACK
11834-
XMEMSET(decryptedKey, 0, MAX_ENCRYPTED_KEY_SZ);
11835-
#endif
11836-
1183711833
switch (pkcs7->state) {
1183811834
case WC_PKCS7_START:
1183911835
case WC_PKCS7_INFOSET_START:
@@ -11872,6 +11868,7 @@ WOLFSSL_API int wc_PKCS7_DecodeAuthEnvelopedData(PKCS7* pkcs7, byte* in,
1187211868
pkcs7->stream->key = decryptedKey;
1187311869
#endif
1187411870
#endif
11871+
XMEMSET(decryptedKey, 0, MAX_ENCRYPTED_KEY_SZ);
1187511872
FALL_THROUGH;
1187611873

1187711874
case WC_PKCS7_DECRYPT_KTRI:

0 commit comments

Comments
 (0)