From dcd2ff33e010cbfe958a2375381bbbbaf23ef747 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 28 Nov 2008 11:57:11 +0000 Subject: [PATCH] Fixed bug #46366 (bad cwd with / as pathinfo) --- sapi/cgi/cgi_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 56fe1cba67..c8efa4a41e 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -1087,6 +1087,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); -- 2.50.1