diff options
author | Tom Yu <tlyu@mit.edu> | 2000-09-27 03:54:33 +0000 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 2000-09-27 03:54:33 +0000 |
commit | be06fd7f499cf90eaa48616118ff56288e88f461 (patch) | |
tree | 13945880ec1b30b5329fde31480e065d341d7a96 /src/lib/krb5/asn.1/asn1_get.c | |
parent | 5d6ad6ec8cba62d032eb3fd2970ce5f9d433de89 (diff) | |
download | krb5-be06fd7f499cf90eaa48616118ff56288e88f461.zip krb5-be06fd7f499cf90eaa48616118ff56288e88f461.tar.gz krb5-be06fd7f499cf90eaa48616118ff56288e88f461.tar.bz2 |
* asn1_get.c (asn1_get_tag_indef): Fix to not deref random garbage
while checking for EOC encoding. At least the indefinite decoding
breaks consistently now.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12684 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/asn.1/asn1_get.c')
-rw-r--r-- | src/lib/krb5/asn.1/asn1_get.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/krb5/asn.1/asn1_get.c b/src/lib/krb5/asn.1/asn1_get.c index 9715b03..c8a50ad 100644 --- a/src/lib/krb5/asn.1/asn1_get.c +++ b/src/lib/krb5/asn.1/asn1_get.c @@ -43,7 +43,8 @@ asn1_get_tag_indef(buf, class, construction, tagnum, retlen, indef) return 0; } /* Allow for the indefinite encoding */ - if ( !*(buf->next) && !*(buf->next + 1)) { + if ((buf->bound - buf->next + 1 >= 2) + && !*(buf->next) && !*(buf->next + 1)) { buf->next += 2; *tagnum = ASN1_TAGNUM_CEILING; return 0; |