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 /main | |
| parent | 1a4c15d5e101e91e91ed1cba4c14606cd7efb762 (diff) | |
| download | php-git-f8d7d6fc905c8a68088fb917dc13e471fbd88256.tar.gz | |
Fixed bug #43491 (Under certain conditions, file_exists() never returns)
Diffstat (limited to 'main')
| -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 { |
