From: Ilia Alshanetsky Date: Sat, 30 Dec 2006 01:56:18 +0000 (+0000) Subject: Fixes test #50 X-Git-Tag: php-5.2.1RC2~36 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=790b0b9edf607327bcb0b427eec5f317033c322f;p=php Fixes test #50 --- diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c index 18ff5197dc..c3dfd00db5 100644 --- a/ext/filter/logical_filters.c +++ b/ext/filter/logical_filters.c @@ -382,6 +382,9 @@ void php_filter_float(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */ Z_DVAL_P(value) = lval; break; case IS_DOUBLE: + if ((!dval && p - num > 1 && strpbrk(num, "123456789")) || !zend_finite(dval)) { + goto error; + } zval_dtor(value); Z_TYPE_P(value) = IS_DOUBLE; Z_DVAL_P(value) = dval;