Merge pull request #7106 from bandi13/20231114-codesonar-fixes

20231114 codesonar fixes
This commit is contained in:
Sean Parkinson
2024-01-04 07:16:33 +10:00
committed by GitHub
5 changed files with 16 additions and 3 deletions
+3 -1
View File
@@ -37602,8 +37602,10 @@ int wc_MIME_parse_headers(char* in, int inLen, MimeHdr** headers)
mimeType == MIME_PARAM)) && pos >= 1) {
mimeStatus = MIME_BODYVAL;
end = pos-1;
if (nameAttr != NULL)
if (nameAttr != NULL) {
XFREE(nameAttr, NULL, DYNAMIC_TYPE_PKCS7);
nameAttr = NULL;
}
ret = wc_MIME_header_strip(curLine, &nameAttr, start, end);
if (ret) {
goto error;
+8 -1
View File
@@ -12576,7 +12576,14 @@ int wc_PKCS7_EncodeEncryptedData(PKCS7* pkcs7, byte* output, word32 outputSz)
return MEMORY_E;
}
FlattenAttributes(pkcs7, flatAttribs, attribs, attribsCount);
ret = FlattenAttributes(pkcs7, flatAttribs, attribs, attribsCount);
if (ret != 0) {
XFREE(attribs, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
XFREE(encryptedContent, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
XFREE(plain, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
XFREE(flatAttribs, pkcs7->heap, DYNAMIC_TYPE_PKCS7);
return ret;
}
attribsSetSz = SetImplicit(ASN_SET, 1, attribsSz, attribSet);
} else {