]> granicus.if.org Git - php/commitdiff
Fixed bug #43491 (Under certain conditions, file_exists() never returns)
authorDmitry Stogov <dmitry@php.net>
Tue, 29 Jan 2008 14:25:07 +0000 (14:25 +0000)
committerDmitry Stogov <dmitry@php.net>
Tue, 29 Jan 2008 14:25:07 +0000 (14:25 +0000)
main/fopen_wrappers.c

index e5631d45b70a022eb24a573c27fb535ef1cee774..690573c0fed11e64fa572c1c2ec7a64f1054ef64 100644 (file)
@@ -204,6 +204,9 @@ PHPAPI int php_check_specific_open_basedir(const char *basedir, const char *path
                        path_len = path_file - path_tmp + 1;
 #if defined(PHP_WIN32) || defined(NETWARE)
                        if (path_len > 1 && path_tmp[path_len - 2] == ':') {
+                               if (path_len != 3) {
+                                       return -1;
+                               } 
                                /* this is c:\ */
                                path_tmp[path_len] = '\0';
                        } else {