diff options
| author | Dmitry Stogov <dmitry@php.net> | 2008-01-29 14:23:19 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2008-01-29 14:23:19 +0000 |
| commit | f8d7d6fc905c8a68088fb917dc13e471fbd88256 (patch) | |
| tree | af7e6036c89c142e278af50c80ba95dd581ea4d5 | |
| parent | 1a4c15d5e101e91e91ed1cba4c14606cd7efb762 (diff) | |
| download | php-git-f8d7d6fc905c8a68088fb917dc13e471fbd88256.tar.gz | |
Fixed bug #43491 (Under certain conditions, file_exists() never returns)
| -rw-r--r-- | NEWS | 2 | ||||
| -rw-r--r-- | main/fopen_wrappers.c | 3 |
2 files changed, 5 insertions, 0 deletions
@@ -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 diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index ce5aa60b66..736da15b0d 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -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 { |
