libtasn1-commit
[Top][All Lists]
Advanced

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

[SCM] GNU libtasn1 branch, libtasn1_3_x, updated. libtasn1_3_7-5-g7f21e2


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU libtasn1 branch, libtasn1_3_x, updated. libtasn1_3_7-5-g7f21e23
Date: Wed, 20 Aug 2014 14:21:16 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU libtasn1".

http://git.savannah.gnu.org/cgit/libtasn1.git/commit/?id=7f21e2301d2ed2c63aa4adb02d1d02e31d8c2ca7

The branch, libtasn1_3_x has been updated
       via  7f21e2301d2ed2c63aa4adb02d1d02e31d8c2ca7 (commit)
      from  57796ca5f5e4c788cfb65baee6485179de4dd3db (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7f21e2301d2ed2c63aa4adb02d1d02e31d8c2ca7
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Wed Aug 20 16:19:53 2014 +0200

    corrected check for infinite encoding
    
    Conflicts:
        lib/decoding.c

-----------------------------------------------------------------------

Summary of changes:
 lib/decoding.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/decoding.c b/lib/decoding.c
index e7bd19f..4fbbabb 100644
--- a/lib/decoding.c
+++ b/lib/decoding.c
@@ -901,6 +901,7 @@ asn1_der_decoding (asn1_node * element, const void *ider, 
int ider_len,
   unsigned char class;
   unsigned long tag;
   int indefinite, result;
+  int tag_len;
   const unsigned char *der = ider;
 
   node = *element;
@@ -923,6 +924,7 @@ asn1_der_decoding (asn1_node * element, const void *ider, 
int ider_len,
   p = node;
   while (1)
     {
+      tag_len = 0;
       ris = ASN1_SUCCESS;
       if (move != UP)
        {
@@ -1050,7 +1052,7 @@ asn1_der_decoding (asn1_node * element, const void *ider, 
int ider_len,
 
          if (ris == ASN1_SUCCESS)
            ris =
-             extract_tag_der_recursive (p, der + counter, ider_len, &len2);
+             extract_tag_der_recursive (p, der + counter, ider_len, &tag_len);
 
          if (ris != ASN1_SUCCESS)
            {
@@ -1076,8 +1078,8 @@ asn1_der_decoding (asn1_node * element, const void *ider, 
int ider_len,
            }
          else
            {
-             DECR_LEN(ider_len, len2);
-             counter += len2;
+             DECR_LEN(ider_len, tag_len);
+             counter += tag_len;
            }
        }
 
@@ -1359,7 +1361,7 @@ asn1_der_decoding (asn1_node * element, const void *ider, 
int ider_len,
              break;
            case ASN1_ETYPE_ANY:
              /* Check indefinite lenth method in an EXPLICIT TAG */
-             if ((p->type & CONST_TAG) && (der[counter - 1] == 0x80))
+             if ((p->type & CONST_TAG) && tag_len == 2 && (der[counter - 1] == 
0x80))
                indefinite = 1;
              else
                indefinite = 0;


hooks/post-receive
-- 
GNU libtasn1



reply via email to

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