diff options
author | Frank Stolle <f.stolle@hosting-agency.de> | 2014-10-30 13:07:04 +0100 |
---|---|---|
committer | Frank Stolle <f.stolle@hosting-agency.de> | 2014-10-30 13:24:06 +0100 |
commit | 1106b10ae8729a23fbc99366dc12731a8140b775 (patch) | |
tree | 898198ff25bbf1f0bb91317f17bb3b38e1bb7773 | |
parent | af22cd665cbcbdfa07a3707d0651f719e023f0ec (diff) | |
download | php-git-1106b10ae8729a23fbc99366dc12731a8140b775.tar.gz |
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.
-rw-r--r-- | sapi/cgi/fastcgi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c index 0cd3096e4d..2b44b59cd6 100644 --- a/sapi/cgi/fastcgi.c +++ b/sapi/cgi/fastcgi.c @@ -989,6 +989,7 @@ static int fcgi_read_request(fcgi_request *req) q = req->env.list; while (q != NULL) { if ((value = zend_hash_str_find(&fcgi_mgmt_vars, q->var, q->var_len)) == NULL) { + q = q->list_next; continue; } zlen = Z_STRLEN_P(value); @@ -1015,6 +1016,7 @@ static int fcgi_read_request(fcgi_request *req) p += q->var_len; memcpy(p, Z_STRVAL_P(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); |