diff options
| author | Felipe Pena <felipe@php.net> | 2008-02-24 18:34:30 +0000 |
|---|---|---|
| committer | Felipe Pena <felipe@php.net> | 2008-02-24 18:34:30 +0000 |
| commit | f75a2de1c17836b97cdc8f6bd9b269b745bf5c0a (patch) | |
| tree | 73c4f3d9f318a873760422de06fcb40af40603f2 /ext/filter | |
| parent | c2805b88e57c27a5810d106942e8ebbc827478b0 (diff) | |
| download | php-git-f75a2de1c17836b97cdc8f6bd9b269b745bf5c0a.tar.gz | |
Fixed segfault in filter extension when using callbacks. (reported & patched by Arnar Mar Sig)
Diffstat (limited to 'ext/filter')
| -rw-r--r-- | ext/filter/filter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/filter/filter.c b/ext/filter/filter.c index c2c097759a..91b89dad78 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")) |
