Skip to content

Commit

Permalink
allow sigParamsSz is zero and malloc(0) to return NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
kojo1 committed Aug 20, 2024
1 parent 8368a32 commit cae0889
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 @@ -779,7 +779,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 cae0889

Please sign in to comment.