Skip to content

Commit

Permalink
Fixed to get CAT content value
Browse files Browse the repository at this point in the history
  • Loading branch information
olszomal committed Jun 3, 2024
1 parent 2c27e2e commit e1c7a02
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cat.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,11 @@ static int cat_sign_ms_ctl_content(PKCS7 *p7, PKCS7 *contents)
u_char *content;
int seqhdrlen, content_length;

if (!contents->d.other || !contents->d.other->value.sequence
|| !contents->d.other->value.sequence->data) {
printf("Failed to get content value\n");
return 0; /* FAILED */
}
seqhdrlen = asn1_simple_hdr_len(contents->d.other->value.sequence->data,
contents->d.other->value.sequence->length);
content = contents->d.other->value.sequence->data + seqhdrlen;
Expand Down

0 comments on commit e1c7a02

Please sign in to comment.