help-libtasn1
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/3] Check that p is not NULL


From: Kurt Roeckx
Subject: [PATCH 3/3] Check that p is not NULL
Date: Sat, 26 Apr 2014 18:10:32 +0200

As far as I can tell this should never happen.
---
 lib/coding.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/coding.c b/lib/coding.c
index 7f9173c..9598067 100644
--- a/lib/coding.c
+++ b/lib/coding.c
@@ -865,6 +865,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))
-- 
1.9.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]