diff options
-rw-r--r-- | libexec/ftpd/popen.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libexec/ftpd/popen.c b/libexec/ftpd/popen.c index 47534d525be7..4996c257ee2c 100644 --- a/libexec/ftpd/popen.c +++ b/libexec/ftpd/popen.c @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)popen.c 8.3 (Berkeley) 4/6/94"; #endif static const char rcsid[] = - "$Id: popen.c,v 1.9 1997/11/21 07:38:43 charnier Exp $"; + "$Id: popen.c,v 1.10 1998/02/25 07:10:57 danny Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -94,9 +94,11 @@ ftpd_popen(program, type) return (NULL); /* break up string into pieces */ - for (argc = 0, cp = program; argc < MAXUSRARGS; cp = NULL) + for (argc = 0, cp = program; argc < MAXUSRARGS; cp = NULL) { if (!(argv[argc++] = strtok(cp, " \t\n"))) break; + } + argv[argc - 1] = NULL; /* glob each piece */ gargv[0] = argv[0]; |