Merge pull request #7887 from kojo1/crl-pss

allow sigParamsSz is zero and malloc(0) to return NULL
This commit is contained in:
JacobBarthelmeh
2024-09-18 10:04:29 -06:00
committed by GitHub

View File

@@ -777,7 +777,8 @@ static CRL_Entry* DupCRL_Entry(const CRL_Entry* ent, void* heap)
#endif
if (dupl->toBeSigned == NULL || dupl->signature == NULL
#ifdef WC_RSA_PSS
|| dupl->sigParams == NULL
/* allow sigParamsSz is zero and malloc(0) to return NULL */
|| (dupl->sigParams == NULL && dupl->sigParamsSz != 0)
#endif
) {
CRL_Entry_free(dupl, heap);