We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5367710 commit 409f64dCopy full SHA for 409f64d
ext/standard/dir.c
@@ -400,6 +400,9 @@ PHP_FUNCTION(glob)
400
401
/* we assume that any glob pattern will match files from one directory only
402
so checking the dirname of the first match should be sufficient */
403
+ if (!globbuf.gl_pathv) {
404
+ RETURN_FALSE;
405
+ }
406
strncpy(cwd, globbuf.gl_pathv[0], MAXPATHLEN);
407
if (PG(safe_mode) && (!php_checkuid(cwd, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
408
RETURN_FALSE;
0 commit comments