summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2007-07-24 09:07:50 +0000
committerDmitry Stogov <dmitry@php.net>2007-07-24 09:07:50 +0000
commit46f26a1aac3d74ea5e2ef55287cb72f2f724dad5 (patch)
tree9f6ab5e62830d05daadd88f7adfa6368cf45093d
parentb1e99fc723fe56a7b5881c9e0b5c289aa3cc0d2d (diff)
downloadphp-git-46f26a1aac3d74ea5e2ef55287cb72f2f724dad5.tar.gz
Fixed bug #42027 is_file() / is_dir() matches file/dirnames with wildcard char or trailing slash
-rw-r--r--TSRM/tsrm_virtual_cwd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c
index 0e2e2ed63f..1a7fb31191 100644
--- a/TSRM/tsrm_virtual_cwd.c
+++ b/TSRM/tsrm_virtual_cwd.c
@@ -565,6 +565,13 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
#endif
no_realpath:
+#ifdef TSRM_WIN32
+ if (memchr(path, '*', path_length) ||
+ memchr(path, '?', path_length)) {
+ return 1;
+ }
+#endif
+
free_path = path_copy = tsrm_strndup(path, path_length);
CWD_STATE_COPY(&old_state, state);