Merge pull request #7063 from embhorn/13dec2023_cov_fixes

Fixes for release
This commit is contained in:
Chris Conlon
2023-12-13 16:19:13 -07:00
committed by GitHub
2 changed files with 8 additions and 1 deletions

View File

@ -32504,7 +32504,7 @@ static int EccSpecifiedECDomainDecode(const byte* input, word32 inSz,
}
}
if (curveSz) {
if ((ret == 0) && (curveSz)) {
*curveSz = curve->size;
}

View File

@ -11825,6 +11825,10 @@ WOLFSSL_API int wc_PKCS7_DecodeAuthEnvelopedData(PKCS7* pkcs7, byte* in,
}
#endif
#ifndef WOLFSSL_SMALL_STACK
XMEMSET(decryptedKey, 0, MAX_ENCRYPTED_KEY_SZ);
#endif
switch (pkcs7->state) {
case WC_PKCS7_START:
case WC_PKCS7_INFOSET_START:
@ -11856,6 +11860,9 @@ WOLFSSL_API int wc_PKCS7_DecodeAuthEnvelopedData(PKCS7* pkcs7, byte* in,
ret = MEMORY_E;
break;
}
else {
XMEMSET(decryptedKey, 0, MAX_ENCRYPTED_KEY_SZ);
}
#ifndef NO_PKCS7_STREAM
pkcs7->stream->key = decryptedKey;
#endif