]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Reduce stack usage, 32 bytes are enough here, no need to
authorRainer Jung <rjung@apache.org>
Mon, 10 Jun 2013 17:46:53 +0000 (17:46 +0000)
committerRainer Jung <rjung@apache.org>
Mon, 10 Jun 2013 17:46:53 +0000 (17:46 +0000)
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

index 19a492eebe2ea4d828f3ae642ca10b23b5b57853..3d36c77b8107e5f1782306d81f864aeba785133d 100644 (file)
@@ -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, "</td><td", (d->style_sheet != NULL) ? " class=\"indexcollastmod\">" : " align=\"right\">",time_str, NULL);