diff --git a/src/daemon/https/minitasn1/coding.c b/src/daemon/https/minitasn1/coding.c index 385577a0..af28be4c 100644 --- a/src/daemon/https/minitasn1/coding.c +++ b/src/daemon/https/minitasn1/coding.c @@ -626,8 +626,9 @@ _asn1_ordering_set (unsigned char *der, int der_len, node_asn * node) return; p = node->down; - while ((type_field (p->type) == TYPE_TAG) - || (type_field (p->type) == TYPE_SIZE)) + while ( (p != NULL) && + ((type_field (p->type) == TYPE_TAG) + || (type_field (p->type) == TYPE_SIZE)) ) p = p->right; if ((p == NULL) || (p->right == NULL))