libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 7bbbb77da4c6a78a126ea711dc81e6e319a48fcc
parent 94b0928fbf4b7bdeeed971cce4ba130a76818572
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 24 Aug 2008 22:28:54 +0000

handle null case gracefully

Diffstat:
Msrc/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 @@ -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))