diff options
| author | Dmitry Stogov <dmitry@php.net> | 2008-01-29 14:25:07 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2008-01-29 14:25:07 +0000 |
| commit | 6c51ef721f280208d90a197da32e42ef7a33972c (patch) | |
| tree | 3e5d95247e3b2304460661fa291ad30009dc4a79 | |
| parent | 87c9233d833e435da43d6e08194a95d6a406bae4 (diff) | |
| download | php-git-6c51ef721f280208d90a197da32e42ef7a33972c.tar.gz | |
Fixed bug #43491 (Under certain conditions, file_exists() never returns)
| -rw-r--r-- | main/fopen_wrappers.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index e5631d45b7..690573c0fe 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -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 { |
