com php-src: Fix #66479: Wrong response to FCGI_GET_VALUES : NEWS sapi/cgi/fastcgi.c
| From: | Stanislav Malyshev | Date: | Sun, 01 Feb 2015 08:35:23 +0000 |
| Subject: | com php-src: Fix #66479: Wrong response to FCGI_GET_VALUES : NEWS sapi/cgi/fastcgi.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-84544@lists.php.net to get a copy of this message | ||
Commit: 6a905a9a3cae60ffb22f7472d9fa977e54c24d5d
Author: Frank Stolle <f.stolle@hosting-agency.de> Thu, 30 Oct 2014 13:07:04 +0100
Committer: Stanislav Malyshev <stas@php.net> Sun, 1 Feb 2015 00:35:23 -0800
Parents: de31324c221c1791b26350ba106cc26bad23ace9
Branches: PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6a905a9a3cae60ffb22f7472d9fa977e54c24d5d
Log:
Fix #66479: Wrong response to FCGI_GET_VALUES
Requesting Get-Values via FCGI caused an "endless" loop over the last requested parameter
and ended with an invalid response. this patch solves this loop bug.
Conflicts:
sapi/cgi/fastcgi.c
Bugs:
https://bugs.php.net/66479
Changed paths:
M NEWS
M sapi/cgi/fastcgi.c
Diff:
diff --git a/NEWS b/NEWS
index 4e33fbd..7a15879 100644
--- a/NEWS
+++ b/NEWS
@@ -3,10 +3,10 @@ PHP NEWS
?? ??? 2015, PHP 5.5.22
- Core:
- . Fixed bug #68925 (Mitigation for CVE-2015-0235 – GHOST: glibc gethostbyname
- buffer overflow). (Stas)
. Fixed bug #67068 (getClosure returns somethings that's not a closure).
(Danack at basereality dot com)
+ . Fixed bug #68925 (Mitigation for CVE-2015-0235 – GHOST: glibc gethostbyname
+ buffer overflow). (Stas)
- Date:
. Fixed bug #45081 (strtotime incorrectly interprets SGT time zone). (Derick)
@@ -20,6 +20,7 @@ PHP NEWS
. Fixed bug #68827 (Double free with disabled ZMM). (Joshua Rogers)
- FPM:
+ . Fixed bug #66479 (Wrong response to FCGI_GET_VALUES). (Frank Stolle)
. Fixed bug #68571 (core dump when webserver close the socket).
(redfoxli069 at gmail dot com, Laruence)
diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c
index 98d503e..b79fbfa 100644
--- a/sapi/cgi/fastcgi.c
+++ b/sapi/cgi/fastcgi.c
@@ -998,6 +998,7 @@ static int fcgi_read_request(fcgi_request *req)
q = req->env.list;
while (q != NULL) {
if (zend_hash_find(&fcgi_mgmt_vars, q->var, q->var_len, (void**) &value) !=
SUCCESS) {
+ q = q->list_next;
continue;
}
zlen = Z_STRLEN_PP(value);
@@ -1024,6 +1025,7 @@ static int fcgi_read_request(fcgi_request *req)
p += q->var_len;
memcpy(p, Z_STRVAL_PP(value), zlen);
p += zlen;
+ q = q->list_next;
}
len = p - buf - sizeof(fcgi_header);
len += fcgi_make_header((fcgi_header*)buf, FCGI_GET_VALUES_RESULT, 0, len);