reduce stack usage of uh_file_dirlist
authorFelix Fietkau <nbd@openwrt.org>
Wed, 2 Jan 2013 18:29:08 +0000 (19:29 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 2 Jan 2013 18:46:17 +0000 (19:46 +0100)
file.c

diff --git a/file.c b/file.c
index 367ab3ec223e7a8ccb85b409fbc2eca9eb8c6cef..8ccb06b15e62c477a5542860cde38c40b7eaef05 100644 (file)
--- a/file.c
+++ b/file.c
@@ -446,7 +446,7 @@ static void uh_file_dirlist(struct client *cl, struct path_info *pi)
 {
        int i;
        int count = 0;
-       char filename[PATH_MAX];
+       char *filename = uh_buf;
        char *pathptr;
        struct dirent **files = NULL;
        struct stat s;