com php-src: - fix bug #47358, glob returns error, should be empty array(): ext/standard/dir.c
| From: | Pierre Joye | Date: | Tue, 08 Jan 2013 14:02:04 +0000 |
| Subject: | com php-src: - fix bug #47358, glob returns error, should be empty array(): ext/standard/dir.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-70889@lists.php.net to get a copy of this message | ||
Commit: 50ceeb9f750cecedc483ffc3d3e65a3324e21866
Author: Pierre Joye <pierre.php@gmail.com> Tue, 8 Jan 2013 15:02:04 +0100
Parents: bcb3ad043aa36d56945960bf985a673f938711de
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=50ceeb9f750cecedc483ffc3d3e65a3324e21866
Log:
- fix bug #47358, glob returns error, should be empty array()
Bugs:
https://bugs.php.net/47358
Changed paths:
M ext/standard/dir.c
Diff:
diff --git a/ext/standard/dir.c b/ext/standard/dir.c
index 37c3bc8..3f70ea9 100644
--- a/ext/standard/dir.c
+++ b/ext/standard/dir.c
@@ -496,9 +496,7 @@ PHP_FUNCTION(glob)
if (!globbuf.gl_pathc || !globbuf.gl_pathv) {
no_results:
if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) {
- struct stat s;
-
- if (0 != VCWD_STAT(pattern, &s) || S_IFDIR != (s.st_mode & S_IFMT)) {
+ if (php_check_open_basedir_ex(pattern, 0 TSRMLS_CC)) {
RETURN_FALSE;
}
}