make sure gl_pathc != 0 before referencing gl_pathv
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10900 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -148,7 +148,9 @@ ftpd_popen(char *program, char *type, int do_stderr, int no_glob)
|
||||
;
|
||||
|
||||
memset(&gl, 0, sizeof(gl));
|
||||
if (no_glob || glob(argv[argc], flags, NULL, &gl))
|
||||
if (no_glob ||
|
||||
glob(argv[argc], flags, NULL, &gl) ||
|
||||
gl.gl_pathc == 0)
|
||||
gargv[gargc++] = strdup(argv[argc]);
|
||||
else
|
||||
for (pop = gl.gl_pathv;
|
||||
|
Reference in New Issue
Block a user