summaryrefslogtreecommitdiff
path: root/sapi/cgi/cgi_main.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2008-11-28 11:56:50 +0000
committerDmitry Stogov <dmitry@php.net>2008-11-28 11:56:50 +0000
commit281fb1f2ed92147f8aa1638cfdabbb95fc0f371c (patch)
treecfa103bd363855c34056b269063cffe0ff4ef3ba /sapi/cgi/cgi_main.c
parentfbdf0ba4e5b59a813bfccc03be921f221d2eb0c1 (diff)
downloadphp-git-281fb1f2ed92147f8aa1638cfdabbb95fc0f371c.tar.gz
Fixed bug #46366 (bad cwd with / as pathinfo)
Diffstat (limited to 'sapi/cgi/cgi_main.c')
-rw-r--r--sapi/cgi/cgi_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 3fb5e37dda..2d828acb72 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -985,6 +985,9 @@ static void init_request_info(TSRMLS_D)
if (script_path_translated &&
(script_path_translated_len = strlen(script_path_translated)) > 0 &&
(script_path_translated[script_path_translated_len-1] == '/' ||
+#ifdef PHP_WIN32
+ script_path_translated[script_path_translated_len-1] == '\\' ||
+#endif
(real_path = tsrm_realpath(script_path_translated, NULL TSRMLS_CC)) == NULL)) {
char *pt = estrndup(script_path_translated, script_path_translated_len);
int len = script_path_translated_len;