]> granicus.if.org Git - php/commitdiff
Fixed bug #46366 (bad cwd with / as pathinfo)
authorDmitry Stogov <dmitry@php.net>
Fri, 28 Nov 2008 11:57:02 +0000 (11:57 +0000)
committerDmitry Stogov <dmitry@php.net>
Fri, 28 Nov 2008 11:57:02 +0000 (11:57 +0000)
sapi/cgi/cgi_main.c

index f706f86040397cd40ea07058bbe4af96ef58d5ee..a39df163e4c7728ee77c5b7eda63b6c0aa2bfeed 100644 (file)
@@ -1078,6 +1078,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);