summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Roeckx <kurt@roeckx.be>2014-04-26 18:10:32 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2014-04-27 18:28:06 +0200
commit9765641067c5147fc50f67db8fce2992a3cc1037 (patch)
tree50a92e5413cd8e7039bb02e11a319adc0cec6847
parent64c550a34a257130d0cee1ae971f45a492b646f9 (diff)
downloadlibtasn1-9765641067c5147fc50f67db8fce2992a3cc1037.tar.gz
libtasn1-9765641067c5147fc50f67db8fce2992a3cc1037.tar.bz2
libtasn1-9765641067c5147fc50f67db8fce2992a3cc1037.zip
Check that p is not NULL
As far as I can tell this should never happen.
-rw-r--r--lib/coding.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/coding.c b/lib/coding.c
index 86df6f0..e561700 100644
--- a/lib/coding.c
+++ b/lib/coding.c
@@ -862,6 +862,8 @@ _asn1_ordering_set_of (unsigned char *der, int der_len, asn1_node node)
while (p && ((type_field (p->type) == ASN1_ETYPE_TAG) ||
(type_field (p->type) == ASN1_ETYPE_SIZE)))
p = p->right;
+ if (p == NULL)
+ return ASN1_VALUE_NOT_VALID;
p = p->right;
if ((p == NULL) || (p->right == NULL))