rcolebaugh / rpms / openssh

Forked from rpms/openssh 2 years ago
Clone
f09e2e
diff -up openssh-5.8p1/sftp-glob.c.glob openssh-5.8p1/sftp-glob.c
f09e2e
--- openssh-5.8p1/sftp-glob.c.glob	2011-03-07 20:17:34.000000000 +0100
f09e2e
+++ openssh-5.8p1/sftp-glob.c	2011-03-07 20:18:47.000000000 +0100
f09e2e
@@ -145,5 +145,5 @@ remote_glob(struct sftp_conn *conn, cons
f09e2e
 	memset(&cur, 0, sizeof(cur));
f09e2e
 	cur.conn = conn;
f09e2e
 
f09e2e
-	return(glob(pattern, flags | GLOB_ALTDIRFUNC, errfunc, pglob));
f09e2e
+	return(glob(pattern, flags | GLOB_LIMIT | GLOB_ALTDIRFUNC, errfunc, pglob));
f09e2e
 }
674526
diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c
674526
index 742b4b9..acae399 100644
674526
--- a/openbsd-compat/glob.c
674526
+++ b/openbsd-compat/glob.c
674526
@@ -130,8 +130,8 @@ typedef char Char;
674526
 #define	M_CLASS		META(':')
674526
 #define	ismeta(c)	(((c)&M_QUOTE) != 0)
674526
 
674526
-#define	GLOB_LIMIT_MALLOC	65536
674526
-#define	GLOB_LIMIT_STAT		128
674526
+#define	GLOB_LIMIT_MALLOC	65536*64
674526
+#define	GLOB_LIMIT_STAT		128*64
674526
 #define	GLOB_LIMIT_READDIR	16384
674526
 
674526
 /* Limit of recursion during matching attempts. */