Skip to content

Commit fcb8d3f

Browse files
Merge pull request #7887 from kojo1/crl-pss
allow sigParamsSz is zero and malloc(0) to return NULL
2 parents fb2144d + 4bedef9 commit fcb8d3f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/crl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,8 @@ static CRL_Entry* DupCRL_Entry(const CRL_Entry* ent, void* heap)
777777
#endif
778778
if (dupl->toBeSigned == NULL || dupl->signature == NULL
779779
#ifdef WC_RSA_PSS
780-
|| dupl->sigParams == NULL
780+
/* allow sigParamsSz is zero and malloc(0) to return NULL */
781+
|| (dupl->sigParams == NULL && dupl->sigParamsSz != 0)
781782
#endif
782783
) {
783784
CRL_Entry_free(dupl, heap);

0 commit comments

Comments
 (0)