diff options
author | Dmitry Stogov <dmitry@php.net> | 2008-01-29 14:24:55 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2008-01-29 14:24:55 +0000 |
commit | 0ac1830d9cc8b43e5f1653920c775aa8897133c4 (patch) | |
tree | 6b9fd782edf00617aeda61ee4bc3079355440b86 | |
parent | ea5148d39474e0788f5e7890011fb936daa21847 (diff) | |
download | php-git-0ac1830d9cc8b43e5f1653920c775aa8897133c4.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 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 { |