Skip to content

Commit d36538c

Browse files
authored
Merge pull request #7063 from embhorn/13dec2023_cov_fixes
Fixes for release
2 parents a66137d + 1d7fd42 commit d36538c

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

wolfcrypt/src/asn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32504,7 +32504,7 @@ static int EccSpecifiedECDomainDecode(const byte* input, word32 inSz,
3250432504
}
3250532505
}
3250632506

32507-
if (curveSz) {
32507+
if ((ret == 0) && (curveSz)) {
3250832508
*curveSz = curve->size;
3250932509
}
3251032510

wolfcrypt/src/pkcs7.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11825,6 +11825,10 @@ WOLFSSL_API int wc_PKCS7_DecodeAuthEnvelopedData(PKCS7* pkcs7, byte* in,
1182511825
}
1182611826
#endif
1182711827

11828+
#ifndef WOLFSSL_SMALL_STACK
11829+
XMEMSET(decryptedKey, 0, MAX_ENCRYPTED_KEY_SZ);
11830+
#endif
11831+
1182811832
switch (pkcs7->state) {
1182911833
case WC_PKCS7_START:
1183011834
case WC_PKCS7_INFOSET_START:
@@ -11856,6 +11860,9 @@ WOLFSSL_API int wc_PKCS7_DecodeAuthEnvelopedData(PKCS7* pkcs7, byte* in,
1185611860
ret = MEMORY_E;
1185711861
break;
1185811862
}
11863+
else {
11864+
XMEMSET(decryptedKey, 0, MAX_ENCRYPTED_KEY_SZ);
11865+
}
1185911866
#ifndef NO_PKCS7_STREAM
1186011867
pkcs7->stream->key = decryptedKey;
1186111868
#endif

0 commit comments

Comments
 (0)