From: Sara Golemon Date: Tue, 10 Jan 2017 00:07:33 +0000 (-0800) Subject: Merge branch 'PHP-5.6' into PHP-7.0 X-Git-Tag: php-7.1.2RC1~98^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=69fbe3a9add21dfd2341472e2e702af5c150e98c;p=php Merge branch 'PHP-5.6' into PHP-7.0 * PHP-5.6: Fix open_basedir check for glob:// opendir wrapper --- 69fbe3a9add21dfd2341472e2e702af5c150e98c diff --cc main/streams/glob_wrapper.c index 4f70cfd2cb,90d7bef0fd..f41ce19d23 --- a/main/streams/glob_wrapper.c +++ b/main/streams/glob_wrapper.c @@@ -224,8 -220,12 +220,12 @@@ static php_stream *php_glob_stream_open } } - if (((options & STREAM_DISABLE_OPEN_BASEDIR) == 0) && php_check_open_basedir(path TSRMLS_CC)) { ++ if (((options & STREAM_DISABLE_OPEN_BASEDIR) == 0) && php_check_open_basedir(path)) { + return NULL; + } + pglob = ecalloc(sizeof(*pglob), 1); - + if (0 != (ret = glob(path, pglob->flags & GLOB_FLAGMASK, NULL, &pglob->glob))) { #ifdef GLOB_NOMATCH if (GLOB_NOMATCH != ret)