From: Pierre Joye Date: Sat, 29 Jul 2006 01:26:55 +0000 (+0000) Subject: - #8315, NULL character stops the validation X-Git-Tag: php-5.2.0RC2~164 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab5c3f184b3069ed0a2fa92646d64b77177913ba;p=php - #8315, NULL character stops the validation --- diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c index 4887c64d70..c299d13e59 100644 --- a/ext/filter/logical_filters.c +++ b/ext/filter/logical_filters.c @@ -119,6 +119,7 @@ void php_filter_int(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */ } i++; p[i] = '\0'; + end = p + i - 1; } /* state 0 */ @@ -189,7 +190,7 @@ stateH1: /* state "hex 1" */ } stateT: /* state "tail" */ - if (*p != '\0') { + if (*p != '\0' || (p-1) != end) { goto stateE; } else { goto stateR; diff --git a/ext/filter/package.xml b/ext/filter/package.xml index cca5fd6a8c..45c38703df 100644 --- a/ext/filter/package.xml +++ b/ext/filter/package.xml @@ -26,10 +26,11 @@ of filters and mechanisms that users can use to safely access their input data. beta 0.10.0 2006-05-14 - - Fixed PECL bug #6136, ini_set should not be able to change the filter.default (Pierre) -- Fixed PECL bug #6639: uppercase hexadecimal digits are not supported + - Fixed PECL bug #8315, NULL character stops the validation (Pierre) - Fixed PECL bug #7733, Float exponential weird result (Pierre) - Fixed PECL bug #7715, Input_get float error (Pierre) +- Fixed PECL bug #6639: uppercase hexadecimal digits are not supported +- Fixed PECL bug #6136, ini_set should not be able to change the filter.default (Pierre) - Implemented PECL req #6641: negative values for hexadecimal and octal numbers are not supported. - Added support for php pcre expressions (Pierre) - Fixed Possible leak in internal sapi_filter (Pierre) diff --git a/ext/filter/tests/bug8315.phpt b/ext/filter/tests/bug8315.phpt new file mode 100644 index 0000000000..5e65590ecd --- /dev/null +++ b/ext/filter/tests/bug8315.phpt @@ -0,0 +1,10 @@ +--TEST-- +bug 8315, NULL values halt the validation +--FILE-- + +--EXPECTF-- +bool(false)