Increase limitation number of files which can be listed using glob in sftp
This commit is contained in:
parent
f3002bfb7b
commit
21bee694ac
@ -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_ALTDIRFUNC, errfunc, pglob));
|
||||||
+ return(glob(pattern, flags | GLOB_LIMIT | 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. */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user