]> 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:23:19 +0000 (14:23 +0000)
committerDmitry Stogov <dmitry@php.net>
Tue, 29 Jan 2008 14:23:19 +0000 (14:23 +0000)
NEWS
main/fopen_wrappers.c

diff --git a/NEWS b/NEWS
index a04bc3ad45b0bccfef92afea8930af45d7f70380..4d38dc9c2ccc7f5fa609b86067767e5bd6432d30 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -50,6 +50,8 @@ PHP                                                                        NEWS
   allowed in ASCII mode). (Ilia, crrodriguez at suse dot de)
 - Fixed bug #43493 (pdo_pgsql does not send username on connect when password
   is not available). (Ilia)
+- Fixed bug #43491 (Under certain conditions, file_exists() never returns).
+  (Dmitry)
 - Fixed bug #43482 (array_pad() does not warn on very small pad numbers).
   (Ilia)
 - Fixed bug #43457 (Prepared statement with incorrect parms doesn't throw 
index ce5aa60b6661ef069b731b6ac63b49c82098d13d..736da15b0d0da9e1c2211742ab32edf81dfe1cd8 100644 (file)
@@ -148,6 +148,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 {