Thanks to Brian Carpenter for reporting this issue.
Reviewed-by: Richard Levitte <levitte@openssl.org>
void *ASN1_TYPE_unpack_sequence(const ASN1_ITEM *it, const ASN1_TYPE *t)
{
void *ASN1_TYPE_unpack_sequence(const ASN1_ITEM *it, const ASN1_TYPE *t)
{
- if (t->type != V_ASN1_SEQUENCE || t->value.sequence == NULL)
+ if (t == NULL || t->type != V_ASN1_SEQUENCE || t->value.sequence == NULL)
return NULL;
return ASN1_item_unpack(t->value.sequence, it);
}
return NULL;
return ASN1_item_unpack(t->value.sequence, it);
}