Module Name:    src
Committed By:   snj
Date:           Mon Apr 12 02:33:59 UTC 2010

Modified Files:
        src/libexec/ftpd [netbsd-5-0]: popen.c

Log Message:
Pull up following revision(s) (requested by lukem in ticket #1372):
        libexec/ftpd/popen.c: revision 1.37
PR/43023: Bruce Cran: FTPD bug remote crash
Since we specify NOCHECK, in the NOMATCH case gl_pathv can be NULL.
(From FreeBSD)


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.34.8.1 src/libexec/ftpd/popen.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/ftpd/popen.c
diff -u src/libexec/ftpd/popen.c:1.34 src/libexec/ftpd/popen.c:1.34.8.1
--- src/libexec/ftpd/popen.c:1.34	Sat Sep 13 02:41:52 2008
+++ src/libexec/ftpd/popen.c	Mon Apr 12 02:33:59 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: popen.c,v 1.34 2008/09/13 02:41:52 lukem Exp $	*/
+/*	$NetBSD: popen.c,v 1.34.8.1 2010/04/12 02:33:59 snj Exp $	*/
 
 /*-
  * Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 #if 0
 static char sccsid[] = "@(#)popen.c	8.3 (Berkeley) 4/6/94";
 #else
-__RCSID("$NetBSD: popen.c,v 1.34 2008/09/13 02:41:52 lukem Exp $");
+__RCSID("$NetBSD: popen.c,v 1.34.8.1 2010/04/12 02:33:59 snj Exp $");
 #endif
 #endif /* not lint */
 
@@ -138,7 +138,8 @@
 		int flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_TILDE|GLOB_LIMIT;
 
 		memset(&gl, 0, sizeof(gl));
-		if (glob(argv[argc], flags, NULL, &gl)) {
+		if (glob(argv[argc], flags, NULL, &gl)
+		    || gl.gl_pathv == NULL)  {
 			if (sl_add(sl, ftpd_strdup(argv[argc])) == -1) {
 				globfree(&gl);
 				goto pfree;

Reply via email to