You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

25 lines
939 B

diff -up openssh-5.8p1/sftp-glob.c.glob openssh-5.8p1/sftp-glob.c
--- openssh-5.8p1/sftp-glob.c.glob 2011-03-07 20:17:34.000000000 +0100
+++ openssh-5.8p1/sftp-glob.c 2011-03-07 20:18:47.000000000 +0100
@@ -145,5 +145,5 @@ remote_glob(struct sftp_conn *conn, cons
memset(&cur, 0, sizeof(cur));
cur.conn = conn;
- 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,8 +130,8 @@ typedef char Char;
#define M_CLASS META(':')
#define ismeta(c) (((c)&M_QUOTE) != 0)
-#define GLOB_LIMIT_MALLOC 65536
-#define GLOB_LIMIT_STAT 128
+#define GLOB_LIMIT_MALLOC 65536*64
+#define GLOB_LIMIT_STAT 128*64
#define GLOB_LIMIT_READDIR 16384
/* Limit of recursion during matching attempts. */