Module Name:    othersrc
Committed By:   lukem
Date:           Sun Mar 21 11:07:37 UTC 2010

Modified Files:
        othersrc/libexec/tnftpd/src: popen.c

Log Message:
Apply rev 1.37 from NetBSD:
 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.15 -r1.16 othersrc/libexec/tnftpd/src/popen.c

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

Modified files:

Index: othersrc/libexec/tnftpd/src/popen.c
diff -u othersrc/libexec/tnftpd/src/popen.c:1.15 othersrc/libexec/tnftpd/src/popen.c:1.16
--- othersrc/libexec/tnftpd/src/popen.c:1.15	Sat Nov  7 03:26:21 2009
+++ othersrc/libexec/tnftpd/src/popen.c	Sun Mar 21 11:07:37 2010
@@ -1,5 +1,5 @@
-/*	$NetBSD: popen.c,v 1.15 2009/11/07 03:26:21 lukem Exp $	*/
-/*	from	NetBSD: popen.c,v 1.36 2009/03/18 02:27:41 lukem Exp	*/
+/*	$NetBSD: popen.c,v 1.16 2010/03/21 11:07:37 lukem Exp $	*/
+/*	from	NetBSD: popen.c,v 1.37 2010/03/20 18:23:30 christos Exp	*/
 
 /*-
  * Copyright (c) 1999-2009 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
 #if 0
 static char sccsid[] = "@(#)popen.c	8.3 (Berkeley) 4/6/94";
 #else
-__RCSID(" NetBSD: popen.c,v 1.36 2009/03/18 02:27:41 lukem Exp  ");
+__RCSID(" NetBSD: popen.c,v 1.37 2010/03/20 18:23:30 christos Exp  ");
 #endif
 #endif /* not lint */
 
@@ -146,7 +146,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