handle null case gracefully

This commit is contained in:
Christian Grothoff committed 2008-08-24 22:28:54 +00:00
1 parent 94b0928fbf
commit 7bbbb77da4
1 file changed
+3 -2
+3 -2
View File
@@ -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))