moriyoshi Fri Feb 6 08:49:05 2009 UTC
Added files: (Branch: PHP_5_2)
/php-src/ext/mbstring/tests bug45239.phpt
Modified files:
/php-src NEWS
/php-src/ext/mbstring/libmbfl/mbfl mbfilter.c
Log:
- MFH: Fix bug #45239 (encoding detector hangs with mbstring.strict_detection
enabled).
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1408&r2=1.2027.2.547.2.1409&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1408 php-src/NEWS:1.2027.2.547.2.1409
--- php-src/NEWS:1.2027.2.547.2.1408 Thu Feb 5 20:56:12 2009
+++ php-src/NEWS Fri Feb 6 08:49:05 2009
@@ -56,7 +56,8 @@
- Fixed bug #46887 (Invalid calls to php_error_docref()).
(oeriksson at mandriva dot com, Ilia)
- Fixed bug #46873 (extract($foo) crashes if $foo['foo'] exists). (Arnaud)
-- Fixed bug #46843 (CP936 euro symbol is not converted properly). (Moriyoshi)
+- Fixed bug #46843 (CP936 euro symbol is not converted properly).
+ (ty_c at cybozuy dot co dot jp, Moriyoshi)
- Fixed bug #46798 (Crash in mssql extension when retrieving a NULL value
inside a binary or image column type). (Ilia)
- Fixed bug #46782 (fastcgi.c parse error). (Matt)
@@ -74,6 +75,8 @@
(admorten at umich dot edu, Stas)
- Fixed bug #45996 (libxml2 2.7 causes breakage with character data
in xml_parse()). (Rob)
+- Fixed bug #45239 (Encoding detector hangs with mbstring.strict_detection
+ enabled). (Moriyoshi)
- Fixed bug #45161 (Reusing a curl handle leaks memory). (Mark Karpeles, Jani)
- Fixed bug #44336 (Improve pcre UTF-8 string matching performance).
(frode at coretrek dot com, Nuno)
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c?r1=1.7.2.5.2.2&r2=1.7.2.5.2.3&diff_format=u
Index: php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c
diff -u php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c:1.7.2.5.2.2
php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c:1.7.2.5.2.3
--- php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c:1.7.2.5.2.2 Fri Aug 1
22:58:20 2008
+++ php-src/ext/mbstring/libmbfl/mbfl/mbfilter.c Fri Feb 6 08:49:05 2009
@@ -462,10 +462,9 @@
while (n >= 0) {
filter = identd->filter_list[n];
if (!filter->flag) {
- if (identd->strict && filter->status) {
- continue;
+ if (!identd->strict || !filter->status) {
+ encoding =
filter->encoding->no_encoding;
}
- encoding = filter->encoding->no_encoding;
}
n--;
}
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/tests/bug45239.phpt?view=markup&rev=1.1
Index: php-src/ext/mbstring/tests/bug45239.phpt
+++ php-src/ext/mbstring/tests/bug45239.phpt
--TEST--
Bug #45239 (encoding detector hangs with mbstring.strict_detection enabled)
--INI--
mbstring.strict_detection=1
mbstring.http_input=UTF-8
mbstring.internal_encoding=UTF-8
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip');
?>
--FILE--
<?php
mb_internal_encoding("utf-8");
mb_parse_str("a=%fc", $dummy);
var_dump(mb_http_input());
?>
--EXPECT--
string(5) "UTF-8"
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php