[PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/sapi/cli/tests/php_cli_server_016.phpt trunk/sapi/cli/tests/php_cli_server_016.phpt
laruence Thu, 22 Dec 2011 08:08:52 + Revision: http://svn.php.net/viewvc?view=revisionrevision=321321 Log: test for bug 60591 Bug: https://bugs.php.net/60591 (Closed) Memory leak when access a non-exists file Changed paths: A php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server_016.phpt A php/php-src/trunk/sapi/cli/tests/php_cli_server_016.phpt Added: php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server_016.phpt === --- php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server_016.phpt (rev 0) +++ php/php-src/branches/PHP_5_4/sapi/cli/tests/php_cli_server_016.phpt 2011-12-22 08:08:52 UTC (rev 321321) @@ -0,0 +1,46 @@ +--TEST-- +Bug #60591 (Memory leak when access a non-exists file) +--DESCRIPTION-- +this is a indirect test for bug 50691, since mem leak is reproted in the server side +and require php compiled with --enable-debug +--SKIPIF-- +?php +include skipif.inc; +? +--FILE-- +?php +include php_cli_server.inc; +php_cli_server_start(PHP +if (preg_match('/\.(?:png|jpg|jpeg|gif)$/', \$_SERVER[REQUEST_URI])) +return false; // serve the requested resource as-is. +else { +echo here; +} +PHP +); + +list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS); +$port = intval($port)?:80; + +$fp = fsockopen($host, $port, $errno, $errstr, 0.5); +if (!$fp) { + die(connect failed); +} + +if(fwrite($fp, HEADER +POST /no-exists.jpg HTTP/1.1 +Host: {$host} + + +HEADER +)) { + while (!feof($fp)) { + echo fgets($fp); +break; + } +} + +fclose($fp); +? +--EXPECTF-- +HTTP/1.1 404 Not Found Added: php/php-src/trunk/sapi/cli/tests/php_cli_server_016.phpt === --- php/php-src/trunk/sapi/cli/tests/php_cli_server_016.phpt (rev 0) +++ php/php-src/trunk/sapi/cli/tests/php_cli_server_016.phpt2011-12-22 08:08:52 UTC (rev 321321) @@ -0,0 +1,46 @@ +--TEST-- +Bug #60591 (Memory leak when access a non-exists file) +--DESCRIPTION-- +this is a indirect test for bug 50691, since mem leak is reproted in the server side +and require php compiled with --enable-debug +--SKIPIF-- +?php +include skipif.inc; +? +--FILE-- +?php +include php_cli_server.inc; +php_cli_server_start(PHP +if (preg_match('/\.(?:png|jpg|jpeg|gif)$/', \$_SERVER[REQUEST_URI])) +return false; // serve the requested resource as-is. +else { +echo here; +} +PHP +); + +list($host, $port) = explode(':', PHP_CLI_SERVER_ADDRESS); +$port = intval($port)?:80; + +$fp = fsockopen($host, $port, $errno, $errstr, 0.5); +if (!$fp) { + die(connect failed); +} + +if(fwrite($fp, HEADER +POST /no-exists.jpg HTTP/1.1 +Host: {$host} + + +HEADER +)) { + while (!feof($fp)) { + echo fgets($fp); +break; + } +} + +fclose($fp); +? +--EXPECTF-- +HTTP/1.1 404 Not Found -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS configure.in main/php_version.h
johannes Thu, 22 Dec 2011 12:33:04 + Revision: http://svn.php.net/viewvc?view=revisionrevision=321327 Log: PHP 5.3.9RC4 Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/configure.in U php/php-src/branches/PHP_5_3/main/php_version.h Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-12-22 11:55:42 UTC (rev 321326) +++ php/php-src/branches/PHP_5_3/NEWS 2011-12-22 12:33:04 UTC (rev 321327) @@ -1,6 +1,6 @@ PHPNEWS ||| -?? ??? 2011, PHP 5.3.9 +22 Dec 2011, PHP 5.3.9RC4 - Core: . Added max_input_vars directive to prevent attacks based on hash collisions Modified: php/php-src/branches/PHP_5_3/configure.in === --- php/php-src/branches/PHP_5_3/configure.in 2011-12-22 11:55:42 UTC (rev 321326) +++ php/php-src/branches/PHP_5_3/configure.in 2011-12-22 12:33:04 UTC (rev 321327) @@ -42,7 +42,7 @@ PHP_MAJOR_VERSION=5 PHP_MINOR_VERSION=3 PHP_RELEASE_VERSION=9 -PHP_EXTRA_VERSION=RC4-dev +PHP_EXTRA_VERSION=RC4 PHP_VERSION=$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 1 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION` Modified: php/php-src/branches/PHP_5_3/main/php_version.h === --- php/php-src/branches/PHP_5_3/main/php_version.h 2011-12-22 11:55:42 UTC (rev 321326) +++ php/php-src/branches/PHP_5_3/main/php_version.h 2011-12-22 12:33:04 UTC (rev 321327) @@ -3,6 +3,6 @@ #define PHP_MAJOR_VERSION 5 #define PHP_MINOR_VERSION 3 #define PHP_RELEASE_VERSION 9 -#define PHP_EXTRA_VERSION RC4-dev -#define PHP_VERSION 5.3.9RC4-dev +#define PHP_EXTRA_VERSION RC4 +#define PHP_VERSION 5.3.9RC4 #define PHP_VERSION_ID 50309 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/tags/
johannes Thu, 22 Dec 2011 12:35:09 + Revision: http://svn.php.net/viewvc?view=revisionrevision=321328 Log: PHP 5.3.9RC4 Changed paths: A + php/php-src/tags/php_5_3_9RC4/ (from php/php-src/branches/PHP_5_3/:r321327) Property changes on: php/php-src/tags/php_5_3_9RC4 ___ Added: svn:ignore + *.gcda *.gcno *.la *.lo *.ncb *.opt *.plg FBCIndex FBCLockFolder deps libs Debug Debug_TS Makefile Makefile.fragments Makefile.objects Release Release_TS Release_TSDbg Release_TS_inline Release_inline ZendEngine1 _libs acconfig.h aclocal.m4 autom4te.cache bsd_converted buildconf.stamp buildmk.stamp confdefs.h config.cache config.h.in config.log config.nice config.nice.bat config.status config_vars.mk configuration-parser.c configuration-parser.h configuration-parser.output configuration-scanner.c configure configure.bat configure.js conftest conftest.c debug.log diff generated_lists include install-sh internal_functions.c lcov_data lcov_html libs libtool meta_cc meta_ccld missing mkinstalldirs modules php php-*.tar.gz php5.spec php_lcov.info php_test_results_*.txt php_version.h results.txt shlibtool stamp-h test.php3 tmp-php.ini want_dependencies x64 Added: svn:mergeinfo + /php/php-src/trunk:284726,305015,305018-305019 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS configure.in main/php_version.h
johannes Thu, 22 Dec 2011 12:36:40 + Revision: http://svn.php.net/viewvc?view=revisionrevision=321329 Log: Back to -dev Changed paths: U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/configure.in U php/php-src/branches/PHP_5_3/main/php_version.h Modified: php/php-src/branches/PHP_5_3/NEWS === --- php/php-src/branches/PHP_5_3/NEWS 2011-12-22 12:35:09 UTC (rev 321328) +++ php/php-src/branches/PHP_5_3/NEWS 2011-12-22 12:36:40 UTC (rev 321329) @@ -1,5 +1,7 @@ PHPNEWS ||| +?? ??? 2012, PHP 5.3.9 + 22 Dec 2011, PHP 5.3.9RC4 - Core: Modified: php/php-src/branches/PHP_5_3/configure.in === --- php/php-src/branches/PHP_5_3/configure.in 2011-12-22 12:35:09 UTC (rev 321328) +++ php/php-src/branches/PHP_5_3/configure.in 2011-12-22 12:36:40 UTC (rev 321329) @@ -42,7 +42,7 @@ PHP_MAJOR_VERSION=5 PHP_MINOR_VERSION=3 PHP_RELEASE_VERSION=9 -PHP_EXTRA_VERSION=RC4 +PHP_EXTRA_VERSION=RC5-dev PHP_VERSION=$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 1 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION` Modified: php/php-src/branches/PHP_5_3/main/php_version.h === --- php/php-src/branches/PHP_5_3/main/php_version.h 2011-12-22 12:35:09 UTC (rev 321328) +++ php/php-src/branches/PHP_5_3/main/php_version.h 2011-12-22 12:36:40 UTC (rev 321329) @@ -3,6 +3,6 @@ #define PHP_MAJOR_VERSION 5 #define PHP_MINOR_VERSION 3 #define PHP_RELEASE_VERSION 9 -#define PHP_EXTRA_VERSION RC4 -#define PHP_VERSION 5.3.9RC4 +#define PHP_EXTRA_VERSION RC5-dev +#define PHP_VERSION 5.3.9RC5-dev #define PHP_VERSION_ID 50309 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/main/php_variables.c branches/PHP_5_4/main/php_variables.c trunk/main/php_variables.c
dmitry Thu, 22 Dec 2011 15:31:41 + Revision: http://svn.php.net/viewvc?view=revisionrevision=321335 Log: Change fatal error into warning and ignore arguments over limit Changed paths: U php/php-src/branches/PHP_5_3/main/php_variables.c U php/php-src/branches/PHP_5_4/main/php_variables.c U php/php-src/trunk/main/php_variables.c Modified: php/php-src/branches/PHP_5_3/main/php_variables.c === --- php/php-src/branches/PHP_5_3/main/php_variables.c 2011-12-22 13:28:01 UTC (rev 321334) +++ php/php-src/branches/PHP_5_3/main/php_variables.c 2011-12-22 15:31:41 UTC (rev 321335) @@ -191,12 +191,14 @@ } if (zend_symtable_find(symtable1, escaped_index, index_len + 1, (void **) gpc_element_p) == FAILURE || Z_TYPE_PP(gpc_element_p) != IS_ARRAY) { - if (zend_hash_num_elements(symtable1) = PG(max_input_vars)) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, Input variables exceeded %ld. To increase the limit change max_input_vars in php.ini., PG(max_input_vars)); + if (zend_hash_num_elements(symtable1) = PG(max_input_vars)) { + if (zend_hash_num_elements(symtable1) == PG(max_input_vars)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Input variables exceeded %ld. To increase the limit change max_input_vars in php.ini., PG(max_input_vars)); + } + MAKE_STD_ZVAL(gpc_element); + array_init(gpc_element); + zend_symtable_update(symtable1, escaped_index, index_len + 1, gpc_element, sizeof(zval *), (void **) gpc_element_p); } - MAKE_STD_ZVAL(gpc_element); - array_init(gpc_element); - zend_symtable_update(symtable1, escaped_index, index_len + 1, gpc_element, sizeof(zval *), (void **) gpc_element_p); } if (index != escaped_index) { efree(escaped_index); @@ -239,10 +241,14 @@ zend_symtable_exists(symtable1, escaped_index, index_len + 1)) { zval_ptr_dtor(gpc_element); } else { - if (zend_hash_num_elements(symtable1) = PG(max_input_vars)) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, Input variables exceeded %ld. To increase the limit change max_input_vars in php.ini., PG(max_input_vars)); + if (zend_hash_num_elements(symtable1) = PG(max_input_vars)) { + if (zend_hash_num_elements(symtable1) == PG(max_input_vars)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Input variables exceeded %ld. To increase the limit change max_input_vars in php.ini., PG(max_input_vars)); + } + zend_symtable_update(symtable1, escaped_index, index_len + 1, gpc_element, sizeof(zval *), (void **) gpc_element_p); + } else { + zval_ptr_dtor(gpc_element); } - zend_symtable_update(symtable1, escaped_index, index_len + 1, gpc_element, sizeof(zval *), (void **) gpc_element_p); } if (escaped_index != index) { efree(escaped_index); Modified: php/php-src/branches/PHP_5_4/main/php_variables.c === --- php/php-src/branches/PHP_5_4/main/php_variables.c 2011-12-22 13:28:01 UTC (rev 321334) +++ php/php-src/branches/PHP_5_4/main/php_variables.c 2011-12-22 15:31:41 UTC (rev 321335) @@ -179,12 +179,14 @@ escaped_index = index; if (zend_symtable_find(symtable1, escaped_index, index_len + 1, (void **) gpc_element_p) == FAILURE || Z_TYPE_PP(gpc_element_p) != IS_ARRAY) { - if (zend_hash_num_elements(symtable1) = PG(max_input_vars)) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, Input variables exceeded %ld. To increase the limit change max_input_vars in php.ini.,
[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/main/streams/userspace.c branches/PHP_5_4/main/streams/userspace.c trunk/main/streams/userspace.c
dmitry Thu, 22 Dec 2011 15:33:48 + Revision: http://svn.php.net/viewvc?view=revisionrevision=321336 Log: Initialize structure (some fields may be missed in array returned from user handler). Changed paths: U php/php-src/branches/PHP_5_3/main/streams/userspace.c U php/php-src/branches/PHP_5_4/main/streams/userspace.c U php/php-src/trunk/main/streams/userspace.c Modified: php/php-src/branches/PHP_5_3/main/streams/userspace.c === --- php/php-src/branches/PHP_5_3/main/streams/userspace.c 2011-12-22 15:31:41 UTC (rev 321335) +++ php/php-src/branches/PHP_5_3/main/streams/userspace.c 2011-12-22 15:33:48 UTC (rev 321336) @@ -863,6 +863,7 @@ #define STAT_PROP_ENTRY(name) STAT_PROP_ENTRY_EX(name,name) + memset(ssb, 0, sizeof(php_stream_statbuf)); STAT_PROP_ENTRY(dev); STAT_PROP_ENTRY(ino); STAT_PROP_ENTRY(mode); Modified: php/php-src/branches/PHP_5_4/main/streams/userspace.c === --- php/php-src/branches/PHP_5_4/main/streams/userspace.c 2011-12-22 15:31:41 UTC (rev 321335) +++ php/php-src/branches/PHP_5_4/main/streams/userspace.c 2011-12-22 15:33:48 UTC (rev 321336) @@ -886,6 +886,7 @@ #define STAT_PROP_ENTRY(name) STAT_PROP_ENTRY_EX(name,name) + memset(ssb, 0, sizeof(php_stream_statbuf)); STAT_PROP_ENTRY(dev); STAT_PROP_ENTRY(ino); STAT_PROP_ENTRY(mode); Modified: php/php-src/trunk/main/streams/userspace.c === --- php/php-src/trunk/main/streams/userspace.c 2011-12-22 15:31:41 UTC (rev 321335) +++ php/php-src/trunk/main/streams/userspace.c 2011-12-22 15:33:48 UTC (rev 321336) @@ -886,6 +886,7 @@ #define STAT_PROP_ENTRY(name) STAT_PROP_ENTRY_EX(name,name) + memset(ssb, 0, sizeof(php_stream_statbuf)); STAT_PROP_ENTRY(dev); STAT_PROP_ENTRY(ino); STAT_PROP_ENTRY(mode); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php