com php-src: Interned strings must not be modified in-place MAKE_COPY_ZVAL() should be changed into ZVAL _DUP(): ext/filter/filter.c
ext/filter/sanitizing _filters.c

From: Date: Wed, 07 May 2014 18:08:25 +0000
Subject: com php-src: Interned strings must not be modified in-place MAKE_COPY_ZVAL() should be changed into ZVAL _DUP(): ext/filter/filter.c
ext/filter/sanitizing _filters.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-78191@lists.php.net to get a copy of this message
Commit: d41d6cf20670f1ff555db1ee5523c45b0f0c83fc Author: Dmitry Stogov <dmitry@zend.com> Wed, 7 May 2014 22:08:25 +0400 Parents: 37d9f1e6e91856922726fb950bd3f3e88ed68efb Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d41d6cf20670f1ff555db1ee5523c45b0f0c83fc Log: Interned strings must not be modified in-place MAKE_COPY_ZVAL() should be changed into ZVAL_DUP() Changed paths: M ext/filter/filter.c M ext/filter/sanitizing_filters.c Diff: diff --git a/ext/filter/filter.c b/ext/filter/filter.c index f77dcb3..20ecbaa 100644 --- a/ext/filter/filter.c +++ b/ext/filter/filter.c @@ -776,7 +776,7 @@ PHP_FUNCTION(filter_var) RETURN_FALSE; } - ZVAL_COPY(return_value, data); + ZVAL_DUP(return_value, data); php_filter_call(return_value, filter, filter_args, 1, FILTER_REQUIRE_SCALAR TSRMLS_CC); } diff --git a/ext/filter/sanitizing_filters.c b/ext/filter/sanitizing_filters.c index 638288a..c936334 100644 --- a/ext/filter/sanitizing_filters.c +++ b/ext/filter/sanitizing_filters.c @@ -184,6 +184,10 @@ void php_filter_string(PHP_INPUT_FILTER_PARAM_DECL) size_t new_len; unsigned char enc[256] = {0}; + if (IS_INTERNED(Z_STR_P(value))) { + ZVAL_STRINGL(value, Z_STRVAL_P(value), Z_STRLEN_P(value)); + } + /* strip high/strip low ( see flags )*/ php_filter_strip(value, flags);

« previous php.cvs (#78191) next »