From: Tom Yu Date: Thu, 17 Jun 1999 21:31:56 +0000 (+0000) Subject: * asn1_encode.c (asn1_encode_generaltime): Fix minor bug in X-Git-Tag: krb5-1.1-beta1~96 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b53ee98c0fb1ffa8aefa28ec318e4d04b2790eca;p=krb5.git * asn1_encode.c (asn1_encode_generaltime): Fix minor bug in bounds-checking for tm_year: 1900 + 8099 = 9999. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11521 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/asn.1/ChangeLog b/src/lib/krb5/asn.1/ChangeLog index 13b4e638b..caeecfe63 100644 --- a/src/lib/krb5/asn.1/ChangeLog +++ b/src/lib/krb5/asn.1/ChangeLog @@ -1,3 +1,8 @@ +1999-06-15 Tom Yu + + * asn1_encode.c (asn1_encode_generaltime): Fix minor bug in + bounds-checking for tm_year: 1900 + 8099 = 9999. + Mon May 10 15:23:51 1999 Danilo Almeida * Makefile.in: Do win32 build in subdir. diff --git a/src/lib/krb5/asn.1/asn1_encode.c b/src/lib/krb5/asn.1/asn1_encode.c index 182de9b37..fe7a39797 100644 --- a/src/lib/krb5/asn.1/asn1_encode.c +++ b/src/lib/krb5/asn.1/asn1_encode.c @@ -210,7 +210,7 @@ asn1_error_code asn1_encode_generaltime(buf, val, retlen) * and some bogus implementations might overrun on the sprintf. */ if (gtime == NULL || - gtime->tm_year > 9999 || gtime->tm_mon > 11 || + gtime->tm_year > 8099 || gtime->tm_mon > 11 || gtime->tm_mday > 31 || gtime->tm_hour > 23 || gtime->tm_min > 59 || gtime->tm_sec > 59) return ASN1_BAD_GMTIME;