From 2d172054d138562b8e8705eddf32e875aceb52f2 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Tue, 18 Jun 1996 00:26:53 +0000 Subject: * str_conv.c (krb5_string_to_timestamp): Ensure that all fields of the timestamp are filled in if strptime does not fill in unspecified fields. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8376 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/ChangeLog | 6 ++++++ src/lib/krb5/krb/str_conv.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index df4c1e5d80..d0a9f230af 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,9 @@ +Mon Jun 17 20:23:48 1996 Ezra Peisach + + * str_conv.c (krb5_string_to_timestamp): Ensure that all fields of + the timestamp are filled in if strptime does not fill in + unspecified fields. + Wed Jun 12 01:10:09 1996 Theodore Ts'o * sendauth.c (krb5_sendauth): If ECCONABORTED is not defined, try diff --git a/src/lib/krb5/krb/str_conv.c b/src/lib/krb5/krb/str_conv.c index c45321ee6a..76a79a86b2 100644 --- a/src/lib/krb5/krb/str_conv.c +++ b/src/lib/krb5/krb/str_conv.c @@ -432,11 +432,17 @@ krb5_string_to_timestamp(string, timestampp) int i; int found; struct tm timebuf; + time_t now; char *s; found = 0; - memset(&timebuf, 0, sizeof(timebuf)); + now = time((time_t *) NULL); for (i=0; i