cvs: php4 /ext/standard dir.c

From: Date: Mon, 23 Dec 2002 18:33:47 +0000
Subject: cvs: php4 /ext/standard dir.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-17389@lists.php.net to get a copy of this message
msopacua Mon Dec 23 13:33:47 2002 EDT Modified files: /php4/ext/standard dir.c Log: Verify if gl_pathv is not NULL, which it is, when GLOB_NOMATCH isn't supported and there are no matches. # BSDi/Mac OSX are affected. Index: php4/ext/standard/dir.c diff -u php4/ext/standard/dir.c:1.111 php4/ext/standard/dir.c:1.112 --- php4/ext/standard/dir.c:1.111 Fri Nov 15 02:21:33 2002 +++ php4/ext/standard/dir.c Mon Dec 23 13:33:46 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dir.c,v 1.111 2002/11/15 07:21:33 sniper Exp $ */ +/* $Id: dir.c,v 1.112 2002/12/23 18:33:46 msopacua Exp $ */ /* {{{ includes/startup/misc */ @@ -400,6 +400,9 @@ /* we assume that any glob pattern will match files from one directory only so checking the dirname of the first match should be sufficient */ + if (!globbuf.gl_pathv) { + RETURN_FALSE; + } strncpy(cwd, globbuf.gl_pathv[0], MAXPATHLEN); if (PG(safe_mode) && (!php_checkuid(cwd, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { RETURN_FALSE;

« previous php.cvs (#17389) next »