From ff3b5c68cc32e30d19edbbc3a962b2266029f3cc Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Sat, 3 May 2014 22:45:32 +0200 Subject: [PATCH] Corrected an off-by-one error. The issue was discovered using the codenomicon TLS suite. --- lib/decoding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/decoding.c b/lib/decoding.c index 0b334fe..16f202a 100644 --- a/lib/decoding.c +++ b/lib/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)) -- 2.7.4