]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
libtasn1: updated to latest version
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Fri, 29 Apr 2016 11:12:36 +0000 (13:12 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Fri, 29 Apr 2016 11:12:36 +0000 (13:12 +0200)
lib/minitasn1/coding.c
lib/minitasn1/decoding.c
lib/minitasn1/element.c

index 0c0f69c5ceecde93e81cd2b3d7eb8e320943e422..7821d85b7a11c3ae6958396cf5c836d4cbc75a77 100644 (file)
@@ -757,7 +757,7 @@ _asn1_ordering_set (unsigned char *der, int der_len, asn1_node node)
       if (err != ASN1_SUCCESS)
        goto error;
 
-      t = class << 24;
+      t = ((unsigned int)class) << 24;
       p_vet->value = t | tag;
       counter += len2;
 
index e5513a38b0eba88f2ff585a3db7a1ec1d02f46f2..cfe23229103e10d0e65cdd291c971220cf5360b2 100644 (file)
@@ -1361,7 +1361,15 @@ asn1_der_decoding2 (asn1_node *element, const void *ider, int *max_ider_len,
                        {       /* indefinite length method */
                          p->tmp_ival = -1;
                        }
+
                      p2 = p->down;
+                      if (p2 == NULL)
+                       {
+                         result = ASN1_DER_ERROR;
+                          warn();
+                         goto cleanup;
+                       }
+
                      while ((type_field (p2->type) == ASN1_ETYPE_TAG)
                             || (type_field (p2->type) == ASN1_ETYPE_SIZE))
                        p2 = p2->right;
@@ -1532,11 +1540,6 @@ asn1_der_decoding (asn1_node * element, const void *ider, int ider_len,
   return asn1_der_decoding2 (element, ider, &ider_len, 0, errorDescription);
 }
 
-#define FOUND        1
-#define SAME_BRANCH  2
-#define OTHER_BRANCH 3
-#define EXIT         4
-
 /**
  * asn1_der_decoding_element:
  * @structure: pointer to an ASN1 structure
index dceb8ba83e5d4cba8e93442a6ec22fe551a8913a..b7a0905efb243960a7fc346826aea9c4bdaaa2fd 100644 (file)
@@ -152,7 +152,10 @@ _asn1_append_sequence_set (asn1_node node, struct node_tail_cache_st *pcache)
   while ((type_field (p->type) == ASN1_ETYPE_TAG)
         || (type_field (p->type) == ASN1_ETYPE_SIZE))
     p = p->right;
+
   p2 = _asn1_copy_structure3 (p);
+  if (p2 == NULL)
+    return ASN1_GENERIC_ERROR;
 
   if (pcache == NULL || pcache->tail == NULL || pcache->head != node)
     {