Re: [PATCH] Fix segfault in filter extension when using callbacks
| From: | Felipe Pena | Date: | Sun, 24 Feb 2008 18:36:06 +0000 |
| Subject: | Re: [PATCH] Fix segfault in filter extension when using callbacks | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-35771@lists.php.net to get a copy of this message | ||
Em Dom, 2008-02-24 às 15:48 +0000, Arnar Mar Sig escreveu:
> Erm, the attachement got stripped away, heres the patch..
>
> --- php-5.2.5/ext/filter/filter.c 2007-04-04 20:50:26.000000000 +0000
> +++ php-5.2.5-fixed/ext/filter/filter.c 2008-02-24 15:14:19.000000000
> +0000
> @@ -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"))
>
> Arnar Mar Sig
Fixed in CVS.
Thanks.
--
Regards,
Felipe Pena.