summaryrefslogtreecommitdiff
path: root/lib/decoding.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2014-05-03 22:45:32 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2014-05-04 12:24:26 +0200
commitff3b5c68cc32e30d19edbbc3a962b2266029f3cc (patch)
tree6e7fde83cee1bf1188e43eeb74b3bf253a98b9f7 /lib/decoding.c
parent83e082736887afcaec3fd92b06b7fde8b5d78837 (diff)
downloadlibtasn1-ff3b5c68cc32e30d19edbbc3a962b2266029f3cc.tar.gz
libtasn1-ff3b5c68cc32e30d19edbbc3a962b2266029f3cc.tar.bz2
libtasn1-ff3b5c68cc32e30d19edbbc3a962b2266029f3cc.zip
Corrected an off-by-one error.
The issue was discovered using the codenomicon TLS suite.
Diffstat (limited to 'lib/decoding.c')
-rw-r--r--lib/decoding.c2
1 files changed, 1 insertions, 1 deletions
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))