Skip to content

Commit

Permalink
Merge pull request #7887 from kojo1/crl-pss
Browse files Browse the repository at this point in the history
allow sigParamsSz is zero and malloc(0) to return NULL
  • Loading branch information
JacobBarthelmeh authored Sep 18, 2024
2 parents fb2144d + 4bedef9 commit fcb8d3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/crl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fcb8d3f

Please sign in to comment.