Skip to content

Commit 4bedef9

Browse files
committed
allow sigParamsSz is zero and malloc(0) to return NULL
1 parent a39f521 commit 4bedef9

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)