From c8eccc486ba2b2ea9ac4937942ef18db4010404f Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Tue, 20 Mar 2007 21:28:30 +0200 Subject: [PATCH] ftp: Allocate a larger buffer for the timestamp string. --- src/protocol/ftp/ftp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/protocol/ftp/ftp.c b/src/protocol/ftp/ftp.c index 8218f744..a93aae18 100644 --- a/src/protocol/ftp/ftp.c +++ b/src/protocol/ftp/ftp.c @@ -1150,7 +1150,10 @@ display_dir_entry(struct cache_entry *cached, off_t *pos, int *tries, time_t when = ftp_info->mtime; struct tm *when_tm; unsigned char *fmt; - unsigned char date[13]; + /* LC_TIME=fi_FI.UTF_8 can generate "elo___ 31 23:59" + * where each _ denotes U+00A0 encoded as 0xC2 0xA0, + * thus needing a 19-byte buffer. */ + unsigned char date[80]; int wr; if (ftp_info->local_time_zone)