felipe Sun Feb 24 18:42:09 2008 UTC
Modified files:
/php-src/ext/filter filter.c
Log:
MFB: Fixed segfault in filter extension when using callbacks.
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter.c?r1=1.92&r2=1.93&diff_format=u
Index: php-src/ext/filter/filter.c
diff -u php-src/ext/filter/filter.c:1.92 php-src/ext/filter/filter.c:1.93
--- php-src/ext/filter/filter.c:1.92 Wed Feb 6 19:06:05 2008
+++ php-src/ext/filter/filter.c Sun Feb 24 18:42:09 2008
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filter.c,v 1.92 2008/02/06 19:06:05 jani Exp $ */
+/* $Id: filter.c,v 1.93 2008/02/24 18:42:09 felipe Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -275,7 +275,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.92 $");
+ php_info_print_table_row( 2, "Revision", "$Revision: 1.93 $");
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
@@ -322,7 +322,7 @@
filter_func.function(*value, flags, options, charset TSRMLS_CC);
if (
- options &&
+ options && (Z_TYPE_P(options) == IS_ARRAY || Z_TYPE_P(options)
== IS_OBJECT) &&
((flags & FILTER_NULL_ON_FAILURE && Z_TYPE_PP(value) ==
IS_NULL) ||
(!(flags & FILTER_NULL_ON_FAILURE) && Z_TYPE_PP(value) ==
IS_BOOL && Z_LVAL_PP(value) == 0)) &&
zend_hash_exists(HASH_OF(options), "default", sizeof("default"))
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php