Increase limitation number of files which can be listed using glob in sftp

This commit is contained in:
Jakub Jelen 2015-06-25 16:10:35 +02:00
parent f3002bfb7b
commit 21bee694ac
1 changed files with 14 additions and 0 deletions

View File

@ -8,3 +8,17 @@ diff -up openssh-5.8p1/sftp-glob.c.glob openssh-5.8p1/sftp-glob.c
- return(glob(pattern, flags | GLOB_ALTDIRFUNC, errfunc, pglob));
+ return(glob(pattern, flags | GLOB_LIMIT | GLOB_ALTDIRFUNC, errfunc, pglob));
}
diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c
index 742b4b9..acae399 100644
--- a/openbsd-compat/glob.c
+++ b/openbsd-compat/glob.c
@@ -130,7 +130,7 @@ typedef char Char;
#define ismeta(c) (((c)&M_QUOTE) != 0)
#define GLOB_LIMIT_MALLOC 65536
-#define GLOB_LIMIT_STAT 128
+#define GLOB_LIMIT_STAT 1024
#define GLOB_LIMIT_READDIR 16384
/* Limit of recursion during matching attempts. */