From: Ken Raeburn Date: Thu, 24 Jul 2003 21:12:50 +0000 (+0000) Subject: Added a little more buffer space than the supplied patch, and used sizeof X-Git-Tag: krb5-1.4-beta1~789 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b3cb20363d99c8edeaa2796d21d007e44a9ee91d;p=krb5.git Added a little more buffer space than the supplied patch, and used sizeof * kadmin.c (strdate): Increase size of buffer to 40. Use sizeof for length passed to strftime. ticket: 1613 target_version: 1.3.2 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15735 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kadmin/cli/ChangeLog b/src/kadmin/cli/ChangeLog index 12c4a1671..2c54a5326 100644 --- a/src/kadmin/cli/ChangeLog +++ b/src/kadmin/cli/ChangeLog @@ -1,3 +1,8 @@ +2003-06-24 Ken Raeburn + + * kadmin.c (strdate): Increase size of buffer to 40. Use sizeof + for length passed to strftime. + 2003-05-19 Sam Hartman * kadmin.c (kadmin_startup): Don't register writable keytabs as this is always done by the library now. diff --git a/src/kadmin/cli/kadmin.c b/src/kadmin/cli/kadmin.c index 256537b28..eb5468dde 100644 --- a/src/kadmin/cli/kadmin.c +++ b/src/kadmin/cli/kadmin.c @@ -132,11 +132,11 @@ static char *strdate(when) krb5_timestamp when; { struct tm *tm; - static char out[30]; + static char out[40]; time_t lcltim = when; tm = localtime(&lcltim); - strftime(out, 30, "%a %b %d %H:%M:%S %Z %Y", tm); + strftime(out, sizeof(out), "%a %b %d %H:%M:%S %Z %Y", tm); return out; }