From: Xinchen Hui Date: Fri, 9 Dec 2011 05:37:41 +0000 (+0000) Subject: Fixed bug #60477 (Segfault after two multipart/form-data POST requests) X-Git-Tag: php-5.4.0RC4~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=147c4142791dc69266afad1f378acc3de9fdb5f1;p=php Fixed bug #60477 (Segfault after two multipart/form-data POST requests) --- diff --git a/NEWS b/NEWS index ddd75a02ad..3996013160 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Dec 2011, PHP 5.4.0 RC4 +- CLI SAPI: + . Fixed bug #60477 (Segfault after two multipart/form-data POST requests). + (Laruence) 08 Dec 2011, PHP 5.4.0 RC3 - Core: diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index de4f4b65b5..3854486765 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -1921,6 +1921,7 @@ static int php_cli_server_request_shutdown(php_cli_server *server, php_cli_serve php_cli_server_close_connection(server, client TSRMLS_CC); destroy_request_info(&SG(request_info)); SG(server_context) = NULL; + SG(rfc1867_uploaded_files) = NULL; return SUCCESS; } /* }}} */ diff --git a/sapi/cli/tests/php_cli_server_014.phpt b/sapi/cli/tests/php_cli_server_014.phpt new file mode 100644 index 0000000000..4e95040b5f --- /dev/null +++ b/sapi/cli/tests/php_cli_server_014.phpt @@ -0,0 +1,76 @@ +--TEST-- +Bug #60477: Segfault after two multipart/form-data POST requestes +--SKIPIF-- + +--FILE-- +(.*?)<\/style>/s", "", $output), "\n"; +fclose($fp); + +?> +--EXPECTF-- + +HTTP/1.1 200 OK +Host: %s +Connection: closed +X-Powered-By: %s +Content-type: %s + +done +HTTP/1.1 404 Not Found +Host: %s +Connection: closed +Content-Type: %s +Content-Length: %d + +404 Not Found +

Not Found

The requested resource /main/no-exists.php was not found on this server.