diff options
| author | Ken Raeburn <raeburn@mit.edu> | 2003-07-24 21:12:50 +0000 |
|---|---|---|
| committer | Ken Raeburn <raeburn@mit.edu> | 2003-07-24 21:12:50 +0000 |
| commit | b3cb20363d99c8edeaa2796d21d007e44a9ee91d (patch) | |
| tree | a21d8e52ad40306dc9fe7c3331e5ac47e1234b26 | |
| parent | faf4424b5cabd24ed5a2242e64ffa9a91233812d (diff) | |
| download | krb5-b3cb20363d99c8edeaa2796d21d007e44a9ee91d.tar.gz krb5-b3cb20363d99c8edeaa2796d21d007e44a9ee91d.tar.xz krb5-b3cb20363d99c8edeaa2796d21d007e44a9ee91d.zip | |
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
| -rw-r--r-- | src/kadmin/cli/ChangeLog | 5 | ||||
| -rw-r--r-- | src/kadmin/cli/kadmin.c | 4 |
2 files changed, 7 insertions, 2 deletions
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 <raeburn@mit.edu> + + * kadmin.c (strdate): Increase size of buffer to 40. Use sizeof + for length passed to strftime. + 2003-05-19 Sam Hartman <hartmans@mit.edu> * 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; } |
