svn: /php/php-src/trunk/sapi/fpm/fpm/ fpm_main.c
| From: | Jérôme Loyet | Date: | Tue, 20 Apr 2010 23:28:20 +0000 |
| Subject: | svn: /php/php-src/trunk/sapi/fpm/fpm/ fpm_main.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-62310@lists.php.net to get a copy of this message | ||
fat Tue, 20 Apr 2010 23:28:20 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=298238
Log:
Add a check request_method. If fcgi protocol is not followed, a segfault can occur.
Changed paths:
U php/php-src/trunk/sapi/fpm/fpm/fpm_main.c
Modified: php/php-src/trunk/sapi/fpm/fpm/fpm_main.c
===================================================================
--- php/php-src/trunk/sapi/fpm/fpm/fpm_main.c 2010-04-20 22:47:06 UTC (rev 298237)
+++ php/php-src/trunk/sapi/fpm/fpm/fpm_main.c 2010-04-20 23:28:20 UTC (rev 298238)
@@ -1773,6 +1773,12 @@
return FAILURE;
}
+ /* check request_method has been sent.
+ * if not, the certainly not an HTTP over fcgi request */
+ if (!SG(request_info).request_method) {
+ goto fastcgi_request_done;
+ }
+
if (!strcasecmp(SG(request_info).request_method, "GET") &&
fpm_status_handle_status(SG(request_info).request_uri, SG(request_info).query_string,
&status_buffer, &status_content_type)) {
if (status_buffer) {
if (status_content_type) {