On Sun, Mar 18, 2001 at 04:00:34PM -0600, Jonathan Lemon wrote:
> 
> Patch attached.

Oh yeah, this doesn't include the patch to ftpd, which is fairly trivial.
--
Jonathan


Index: ftpd.c
===================================================================
RCS file: /ncvs/src/libexec/ftpd/ftpd.c,v
retrieving revision 1.72
diff -u -r1.72 ftpd.c
--- ftpd.c      2000/12/20 03:34:54     1.72
+++ ftpd.c      2001/03/18 22:30:45
@@ -189,6 +189,13 @@
 char   *pid_file = NULL;
 
 /*
+ * Limit number of pathnames that glob can return.
+ * A limit of 0 indicates the number of pathnames is unlimited.
+ */
+#define MAXGLOBARGS    16384
+#
+
+/*
  * Timeout intervals for retrying connections
  * to hosts that don't accept PORT cmds.  This
  * is a kludge, but given the problems with TCP...
@@ -2620,6 +2627,8 @@
                int flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE;
 
                memset(&gl, 0, sizeof(gl));
+               gl.gl_matchc = MAXGLOBARGS;
+               flags |= GLOB_MAXPATH;
                freeglob = 1;
                if (glob(whichf, flags, 0, &gl)) {
                        reply(550, "not found");
Index: popen.c
===================================================================
RCS file: /ncvs/src/libexec/ftpd/popen.c,v
retrieving revision 1.19
diff -u -r1.19 popen.c
--- popen.c     2000/09/04 05:47:14     1.19
+++ popen.c     2001/03/18 22:26:38
@@ -107,6 +107,8 @@
                int flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE;
 
                memset(&gl, 0, sizeof(gl));
+               gl.gl_matchc = MAXGLOBARGS;
+               flags |= GLOB_MAXPATH;
                if (glob(argv[argc], flags, NULL, &gl))
                        gargv[gargc++] = strdup(argv[argc]);
                else

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message

Reply via email to