From: Felipe Pena Date: Sun, 24 Feb 2008 18:42:09 +0000 (+0000) Subject: MFB: Fixed segfault in filter extension when using callbacks. X-Git-Tag: RELEASE_2_0_0a1~346 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4707350eedd14b9ecddd71c9bf5a48e1b9d53a81;p=php MFB: Fixed segfault in filter extension when using callbacks. --- diff --git a/ext/filter/filter.c b/ext/filter/filter.c index 4241547ea7..73a5a8483b 100644 --- a/ext/filter/filter.c +++ b/ext/filter/filter.c @@ -322,7 +322,7 @@ static void php_zval_filter(zval **value, long filter, long flags, zval *options 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"))