]> granicus.if.org Git - php/commitdiff
$argc was off by one in -f (fix bug #9289)
authorZeev Suraski <zeev@php.net>
Tue, 8 May 2001 00:51:11 +0000 (00:51 +0000)
committerZeev Suraski <zeev@php.net>
Tue, 8 May 2001 00:51:11 +0000 (00:51 +0000)
sapi/cgi/cgi_main.c

index 7b91edc0b8db93d4425f9b85caa8caf38a51ce07..c2cb43b212f29dea80d3cd518ab00f812abeaa79 100644 (file)
@@ -630,7 +630,9 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
                        *s = '\0';                      /* we are pretending it came from the environment  */
                        if (script_file) {
                                strcpy(s, script_file);
-                               strcat(s, "+");
+                               if (ap_php_optind<argc) {
+                                       strcat(s, "+");
+                               }
                        }
                        for (i = ap_php_optind, len = 0; i < argc; i++) {
                                strcat(s, argv[i]);