* asn1_encode.c (asn1_encode_generaltime): Fix minor bug in
authorTom Yu <tlyu@mit.edu>
Thu, 17 Jun 1999 21:31:56 +0000 (21:31 +0000)
committerTom Yu <tlyu@mit.edu>
Thu, 17 Jun 1999 21:31:56 +0000 (21:31 +0000)
bounds-checking for tm_year: 1900 + 8099 = 9999.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11521 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/asn.1/ChangeLog
src/lib/krb5/asn.1/asn1_encode.c

index 13b4e638b2c5802ce1fb21918b91a4b3b1b5c821..caeecfe630a286e43045b3e674832d0ecf13840c 100644 (file)
@@ -1,3 +1,8 @@
+1999-06-15  Tom Yu  <tlyu@mit.edu>
+
+       * 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  <dalmeida@mit.edu>
 
        * Makefile.in: Do win32 build in subdir.
index 182de9b378e8d3ae79dba87512d3c980865d82a0..fe7a3979775aa246fa368f7b093e37bd228a4d12 100644 (file)
@@ -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;