]> granicus.if.org Git - php/commitdiff
- Add missing access check
authorMarcus Boerger <helly@php.net>
Mon, 26 Feb 2007 22:46:13 +0000 (22:46 +0000)
committerMarcus Boerger <helly@php.net>
Mon, 26 Feb 2007 22:46:13 +0000 (22:46 +0000)
ext/spl/spl_directory.c

index 74b43f79eb4d21c392efeca29930c44f677508a9..fe08a00544251bc55c4f1cc478b594d674606db6 100755 (executable)
@@ -900,6 +900,11 @@ SPL_METHOD(SplFileInfo, getRealPath)
        }
 
        if (VCWD_REALPATH(filename, buff)) {
+#ifdef ZTS
+               if (VCWD_ACCESS(buff, F_OK)) {
+                       RETVAL_FALSE;
+               } else
+#endif
                if (UG(unicode)) {
                        if (php_stream_path_decode(NULL, &path, &path_len, buff, strlen(buff), REPORT_ERRORS, FG(default_context)) == SUCCESS) {
                                RETVAL_UNICODEL(path, path_len, 0);