From: Nikos Mavrogiannopoulos Date: Sun, 4 May 2014 10:52:25 +0000 (+0200) Subject: Corrected an off-by-one error. X-Git-Tag: gnutls_3_3_2~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=88b46492e68ab43b10c768c8dcd3fcebc2b0a4ea;p=thirdparty%2Fgnutls.git Corrected an off-by-one error. The issue was discovered using the codenomicon TLS suite. --- diff --git a/lib/minitasn1/decoding.c b/lib/minitasn1/decoding.c index 0b334fefc4..16f202a2c4 100644 --- a/lib/minitasn1/decoding.c +++ b/lib/minitasn1/decoding.c @@ -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))