diff options
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ftpd/ftpd.c | 8 | ||||
-rw-r--r-- | libexec/ftpd/popen.c | 7 |
2 files changed, 8 insertions, 7 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 3ff824e0dce..95d370104a5 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftpd.c,v 1.94 2001/03/09 19:09:12 millert Exp $ */ +/* $OpenBSD: ftpd.c,v 1.95 2001/03/18 17:20:13 deraadt Exp $ */ /* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */ /* @@ -2564,11 +2564,11 @@ send_file_list(whichf) glob_t gl; if (strpbrk(whichf, "~{[*?") != NULL) { - int flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE; - memset(&gl, 0, sizeof(gl)); freeglob = 1; - if (glob(whichf, flags, 0, &gl)) { + if (glob(whichf, + GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE|GLOB_LIMIT, + 0, &gl)) { reply(550, "not found"); goto out; } else if (gl.gl_pathc == 0) { diff --git a/libexec/ftpd/popen.c b/libexec/ftpd/popen.c index c5b1b247b72..dedb81d2115 100644 --- a/libexec/ftpd/popen.c +++ b/libexec/ftpd/popen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: popen.c,v 1.12 2001/01/24 11:50:55 deraadt Exp $ */ +/* $OpenBSD: popen.c,v 1.13 2001/03/18 17:20:13 deraadt Exp $ */ /* $NetBSD: popen.c,v 1.5 1995/04/11 02:45:00 cgd Exp $ */ /* @@ -104,10 +104,11 @@ ftpd_popen(program, type) gargv[0] = argv[0]; for (gargc = argc = 1; argv[argc]; argc++) { glob_t gl; - int flags = GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE; memset(&gl, 0, sizeof(gl)); - if (glob(argv[argc], flags, NULL, &gl)) { + if (glob(argv[argc], + GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE|GLOB_LIMIT, + NULL, &gl)) { if (gargc < MAX_GARGV-1) { gargv[gargc++] = strdup(argv[argc]); if (gargv[gargc -1] == NULL) |