From b3cb20363d99c8edeaa2796d21d007e44a9ee91d Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Thu, 24 Jul 2003 21:12:50 +0000 Subject: 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 --- src/kadmin/cli/kadmin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/kadmin/cli/kadmin.c') 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; } -- cgit