From 7249ecd24ac2906b0293b4e3f10ab45c52ba7dd0 Mon Sep 17 00:00:00 2001 From: Rainer Jung Date: Mon, 10 Jun 2013 17:46:53 +0000 Subject: [PATCH] Reduce stack usage, 32 bytes are enough here, no need to take 8k in the stack. (19 would be enough, but be safe...) Use the size of the buffer as opposed to MAX_STRING_LEN. Followup to r1491221+r1491479: change consistently the same code used in another place in the same file. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1491538 13f79535-47bb-0310-9956-ffa450edef68 --- modules/generators/mod_autoindex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index 19a492eebe2..3d36c77b810 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -1752,10 +1752,10 @@ static void output_directories(struct ent **ar, int n, } if (!(autoindex_opts & SUPPRESS_LAST_MOD)) { if (ar[x]->lm != -1) { - char time_str[MAX_STRING_LEN]; + char time_str[32]; apr_time_exp_t ts; apr_time_exp_lt(&ts, ar[x]->lm); - apr_strftime(time_str, &rv, MAX_STRING_LEN, + apr_strftime(time_str, &rv, sizeof(time_str), "%Y-%m-%d %H:%M ", &ts); ap_rvputs(r, "style_sheet != NULL) ? " class=\"indexcollastmod\">" : " align=\"right\">",time_str, NULL); -- 2.47.3