krb5 commit: Delete timestamp_to_sfstring sprintf fallback
Tom Yu
tlyu at MIT.EDU
Sat Dec 22 12:47:13 EST 2012
https://github.com/krb5/krb5/commit/d26e137cac97399645f41b19270d565f5bd8192c
commit d26e137cac97399645f41b19270d565f5bd8192c
Author: Tom Yu <tlyu at mit.edu>
Date: Fri Dec 21 16:07:28 2012 -0500
Delete timestamp_to_sfstring sprintf fallback
The final fallback for krb5_timestamp_to_sfstring() is an explicit
European date-order format string passed to sprintf(). This can be
confused with a conventional US date format. Because we attempt to
build a strftime() replacement anyway, and we try passing some
unambiguous ISO 8601 date and time formats to strftime(), remove this
final fallback.
ticket: 7518 (new)
src/lib/krb5/krb/str_conv.c | 9 ---------
1 files changed, 0 insertions(+), 9 deletions(-)
diff --git a/src/lib/krb5/krb/str_conv.c b/src/lib/krb5/krb/str_conv.c
index 1ffd026..e070c91 100644
--- a/src/lib/krb5/krb/str_conv.c
+++ b/src/lib/krb5/krb/str_conv.c
@@ -259,15 +259,6 @@ krb5_timestamp_to_sfstring(krb5_timestamp timestamp, char *buffer, size_t buflen
if ((ndone = strftime(buffer, buflen, sftime_format_table[i], tmp)))
break;
}
- if (!ndone) {
-#define sftime_default_len 2+1+2+1+4+1+2+1+2+1
- if (buflen >= sftime_default_len) {
- snprintf(buffer, buflen, "%02d/%02d/%4d %02d:%02d",
- tmp->tm_mday, tmp->tm_mon+1, 1900+tmp->tm_year,
- tmp->tm_hour, tmp->tm_min);
- ndone = strlen(buffer);
- }
- }
if (ndone && pad) {
for (i=ndone; i<buflen-1; i++)
buffer[i] = *pad;
More information about the cvs-krb5
mailing list