(decode_boolean): fail if length of tag is larger then len

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14187 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2004-09-05 15:23:43 +00:00
parent 886e3ba278
commit 861f615ca9

View File

@@ -265,6 +265,8 @@ decode_boolean (const unsigned char *p, size_t len,
p += l;
len -= l;
ret += l;
if (reallen > len)
return ASN1_OVERRUN;
e = der_get_boolean (p, reallen, num, &l);
if (e) return e;
p += l;