com php-src: Fix #66479: Wrong response to FCGI_GET_VALUES : sapi/cgi/fastcgi.c

From: Date: Thu, 30 Oct 2014 12:24:06 +0000
Subject: com php-src: Fix #66479: Wrong response to FCGI_GET_VALUES : sapi/cgi/fastcgi.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-84543@lists.php.net to get a copy of this message
Commit: 1106b10ae8729a23fbc99366dc12731a8140b775 Author: Frank Stolle <f.stolle@hosting-agency.de> Thu, 30 Oct 2014 13:07:04 +0100 Parents: af22cd665cbcbdfa07a3707d0651f719e023f0ec Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1106b10ae8729a23fbc99366dc12731a8140b775 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. Bugs: https://bugs.php.net/66479 Changed paths: M sapi/cgi/fastcgi.c Diff: diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c index 0cd3096..2b44b59 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);

« previous php.cvs (#84543) next »