libtasn1-commit
[Top][All Lists]
Advanced

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

[SCM] GNU libtasn1 branch, master, updated. libtasn1_2_12-6-g0dd5f96


From: Simon Josefsson
Subject: [SCM] GNU libtasn1 branch, master, updated. libtasn1_2_12-6-g0dd5f96
Date: Thu, 31 May 2012 14:34:32 +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=0dd5f96848dc1b5b4357f9afade87fa05a3f79e5

The branch, master has been updated
       via  0dd5f96848dc1b5b4357f9afade87fa05a3f79e5 (commit)
      from  b2534125fcc53dd86640354a0282722bcbf1a8dc (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 0dd5f96848dc1b5b4357f9afade87fa05a3f79e5
Author: Simon Josefsson <address@hidden>
Date:   Thu May 31 16:34:28 2012 +0200

    Silence compiler warnings about unsigned vs signed comparisons.

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

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

diff --git a/lib/decoding.c b/lib/decoding.c
index 978a205..69482a4 100644
--- a/lib/decoding.c
+++ b/lib/decoding.c
@@ -62,7 +62,7 @@ long
 asn1_get_length_der (const unsigned char *der, int der_len, int *len)
 {
   unsigned int ans, sum, last;
-  unsigned int k, punt;
+  int k, punt;
 
   *len = 0;
   if (der_len <= 0)
@@ -87,7 +87,7 @@ asn1_get_length_der (const unsigned char *der, int der_len, 
int *len)
              last = ans;
 
              ans = (ans*256) + der[punt++];
-             if (ans < last) 
+             if (ans < last)
                /* we wrapped around, no bignum support... */
                return -2;
            }
@@ -102,13 +102,13 @@ asn1_get_length_der (const unsigned char *der, int 
der_len, int *len)
     }
 
   sum = ans + *len;
-  
+
   /* check for overflow as well INT_MAX as a maximum upper
    * limit for length */
   if (sum >= INT_MAX || sum < ans)
     return -2;
-  
-  if (sum > der_len)
+
+  if (((int) sum) > der_len)
     return -4;
 
   return ans;
@@ -130,7 +130,8 @@ int
 asn1_get_tag_der (const unsigned char *der, int der_len,
                  unsigned char *cls, int *len, unsigned long *tag)
 {
-  unsigned int punt, ris;
+  unsigned int ris;
+  int punt;
   unsigned int last;
 
   if (der == NULL || der_len < 2 || len == NULL)


hooks/post-receive
-- 
GNU libtasn1



reply via email to

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