From 7bbbb77da4c6a78a126ea711dc81e6e319a48fcc Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 24 Aug 2008 22:28:54 +0000 Subject: [PATCH] handle null case gracefully --- src/daemon/https/minitasn1/coding.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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))