Hi Stas,
This fix is incorrect.
Now all 5.3 tests are failed for me because of memory leaks.
The problem that php_sapi_filter() might be called from
php_hash_environment() before RINIT() and your patch just overwrites
properly initialized data.
For some reason php_sapi_filter() isn't called in 5.2 and HEAD and they
seem to work, however according to code they may have the same issue.
Thanks. Dmitry.
Stanislav Malyshev wrote:
stas Mon Apr 13 19:24:52 2009 UTC
Modified files:
/php-src/ext/filter filter.c
Log:
fix #47930
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter.c?r1=1.101&r2=1.102&diff_format=u
Index: php-src/ext/filter/filter.c
diff -u php-src/ext/filter/filter.c:1.101 php-src/ext/filter/filter.c:1.102
--- php-src/ext/filter/filter.c:1.101 Tue Mar 10 23:39:17 2009
+++ php-src/ext/filter/filter.c Mon Apr 13 19:24:52 2009
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filter.c,v 1.101 2009/03/10 23:39:17 helly Exp $ */
+/* $Id: filter.c,v 1.102 2009/04/13 19:24:52 stas Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -138,7 +138,7 @@
filter_functions,
PHP_MINIT(filter),
PHP_MSHUTDOWN(filter),
- NULL,
+ PHP_RINIT(filter),
PHP_RSHUTDOWN(filter),
PHP_MINFO(filter),
"0.11.0",
@@ -286,6 +286,20 @@
}
/* }}} */
+/* {{{ PHP_RINIT_FUNCTION
+ */
+PHP_RINIT_FUNCTION(filter)
+{
+ IF_G(get_array) = NULL;
+ IF_G(post_array) = NULL;
+ IF_G(cookie_array) = NULL;
+ IF_G(server_array) = NULL;
+ IF_G(env_array) = NULL;
+ IF_G(session_array) = NULL;
+ return SUCCESS;
+}
+/* }}} */
+
/* {{{ PHP_RSHUTDOWN_FUNCTION
*/
#define VAR_ARRAY_COPY_DTOR(a) \
@@ -312,7 +326,7 @@
{
php_info_print_table_start();
php_info_print_table_row( 2, "Input Validation and Filtering",
"enabled" );
- php_info_print_table_row( 2, "Revision", "$Revision: 1.101 $");
+ php_info_print_table_row( 2, "Revision", "$Revision: 1.102 $");
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php