Corrected an off-by-one error.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 3 May 2014 20:45:32 +0000 (22:45 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 4 May 2014 10:24:26 +0000 (12:24 +0200)
The issue was discovered using the codenomicon TLS suite.

lib/decoding.c

index 0b334fe..16f202a 100644 (file)
@@ -149,7 +149,7 @@ asn1_get_tag_der (const unsigned char *der, int der_len,
       /* Long form */
       punt = 1;
       ris = 0;
-      while (punt <= der_len && der[punt] & 128)
+      while (punt < der_len && der[punt] & 128)
        {
 
          if (INT_MULTIPLY_OVERFLOW (ris, 128))