summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2008-04-09 09:16:40 +0000
committerDmitry Stogov <dmitry@php.net>2008-04-09 09:16:40 +0000
commita548d2f19b2a5510a3554a576ea0f6b1a281ea76 (patch)
tree29becbf344a3cae5333118ec55d5c8c75a49e1e2
parentedf54b5468b38bd34c2801f0c2657af62435ff00 (diff)
downloadphp-git-a548d2f19b2a5510a3554a576ea0f6b1a281ea76.tar.gz
Fixed bug #44673 (With CGI argv/argc starts from arguments, not from script)
-rw-r--r--NEWS2
-rw-r--r--sapi/cgi/cgi_main.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index a4a3de59da..091a86c22d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,8 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Apr 2008, PHP 5.2.6
+- Fixed bug #44673 (With CGI argv/argc starts from arguments, not from script)
+ (Dmitry)
- Fixed bug #44667 (proc_open() does not handle pipes with the mode 'wb'
correctly). (Jani)
- Fixed bug #44650 (escaepshellscmd() does not check arg count). (Ilia)
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index e9cfe31403..a584dab515 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -1760,7 +1760,7 @@ consult the installation file that came with this distribution, or visit \n\
} else if (argc > php_optind) {
/* file is on command line, but not in -f opt */
STR_FREE(SG(request_info).path_translated);
- SG(request_info).path_translated = estrdup(argv[php_optind++]);
+ SG(request_info).path_translated = estrdup(argv[php_optind]);
/* arguments after the file are considered script args */
SG(request_info).argc = argc - php_optind;
SG(request_info).argv = &argv[php_optind];