]> granicus.if.org Git - php/commitdiff
Fixed bug #44673 (With CGI argv/argc starts from arguments, not from script)
authorDmitry Stogov <dmitry@php.net>
Wed, 9 Apr 2008 09:16:40 +0000 (09:16 +0000)
committerDmitry Stogov <dmitry@php.net>
Wed, 9 Apr 2008 09:16:40 +0000 (09:16 +0000)
NEWS
sapi/cgi/cgi_main.c

diff --git a/NEWS b/NEWS
index a4a3de59da040cb4360787a084b56dab025bd7b1..091a86c22d1bd9865a53df9f32ecad9621ed40a7 100644 (file)
--- 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)
index e9cfe314039b0b12dc99e6f5210e735758b630e5..a584dab515475201a518ec79103326a4a33bfbed 100644 (file)
@@ -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];