source: trunk/server/common/patches/php-cve-2012-1823.patch @ 2184

Last change on this file since 2184 was 2184, checked in by ezyang, 10 years ago
Scriptsify PHP, patch CVE 2012-1823.
File size: 712 bytes
RevLine 
[2184]1--- sapi/cgi/cgi_main.c.orig    2012-05-03 14:33:04.243763906 -0400
2+++ sapi/cgi/cgi_main.c 2012-05-03 14:34:03.294241200 -0400
3@@ -1552,7 +1552,7 @@
4                }
5        }
6 
7-       while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0, 2)) != -1) {
8+       if (!cgi) while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 0, 2)) != -1) {
9                switch (c) {
10                        case 'c':
11                                if (cgi_sapi_module.php_ini_path_override) {
12@@ -1801,7 +1801,7 @@
13        }
14 
15        zend_first_try {
16-               while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 1, 2)) != -1) {
17+               if (!cgi) while ((c = php_getopt(argc, argv, OPTIONS, &php_optarg, &php_optind, 1, 2)) != -1) {
18                        switch (c) {
19                                case 'T':
20                                        benchmark = 1;
Note: See TracBrowser for help on using the repository browser.