]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.6' into PHP-7.0
authorSara Golemon <pollita@php.net>
Tue, 10 Jan 2017 00:07:33 +0000 (16:07 -0800)
committerSara Golemon <pollita@php.net>
Tue, 10 Jan 2017 00:07:33 +0000 (16:07 -0800)
* PHP-5.6:
  Fix open_basedir check for glob:// opendir wrapper

1  2 
main/streams/glob_wrapper.c

index 4f70cfd2cbfc89c96790d1529348366003b11863,90d7bef0fd0d2093fefbb8575e110f4b713cc2b0..f41ce19d231dad21678b79b446dc6ba341d9a54b
@@@ -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)