* kerberos_v4.c (check_princ): Call strftime() with correct number
authorTom Yu <tlyu@mit.edu>
Sun, 15 Sep 2002 21:19:02 +0000 (21:19 +0000)
committerTom Yu <tlyu@mit.edu>
Sun, 15 Sep 2002 21:19:02 +0000 (21:19 +0000)
of arguments.

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

src/kdc/ChangeLog
src/kdc/kerberos_v4.c

index 17f2d584d02aa100f0dcd2380dcec11aeb8549bf..7fa252f0cb8a5f62f77fd287699a9a3154d81a4a 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-15  Tom Yu  <tlyu@mit.edu>
+
+       * kerberos_v4.c (check_princ): Call strftime() with correct number
+       of arguments.
+
 2002-09-15  Ken Raeburn  <raeburn@mit.edu>
 
        * kerberos_v4.c: Always include stdarg.h, not varargs.h.
index e24d23340ec54c06cf4e524f6ea553f5516746f5..2856d5fb6b7a2dfa464c9c1bda956c3f0dac8dee 100644 (file)
@@ -1085,7 +1085,8 @@ check_princ(char *p_name, char *instance, int lifetime, Principal *p,
        time_t t = p->exp_date;
 
        tm = localtime(&t);
-       strftime(timestr, "%Y-%m-%d %H:%M:%S", tm);
+       if (!strftime(timestr, sizeof(timestr), "%Y-%m-%d %H:%M:%S", tm))
+           timestr[0] = '\0';
        lt = klog(L_ERR_SEXP,
                  "EXPIRED \"%s\" \"%s\"  %s", p->name, p->instance, timestr);
        return KERB_ERR_NAME_EXP;