#45722 [Asn->Csd]: mb_check_encoding() crashes
| From: | moriyoshi@php.net | Date: | Thu, 16 Oct 2008 01:06:58 +0000 |
| Subject: | #45722 [Asn->Csd]: mb_check_encoding() crashes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-129739@lists.php.net to get a copy of this message | ||
ID: 45722
Updated by: moriyoshi@php.net
Reported By: estacuentanolamiro at gmail dot com
-Status: Assigned
+Status: Closed
Bug Type: mbstring related
Operating System: *
PHP Version: 5.2CVS, 5.3CVS, 6CVS (2008-08-05)
Assigned To: moriyoshi
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2008-08-05 12:13:09] jani@php.net
Moriyoshi, verified with all branches.
------------------------------------------------------------------------
[2008-08-05 11:54:36] estacuentanolamiro at gmail dot com
Sorry, correct reproduce code:
$text = "&· ASDF ASDF ASDF ASDF ASDF ASDF ASDF";
if( !mb_check_encoding($text,'HTML-ENTITIES') ) {
$text = htmlentities($text);
}
echo $text;
------------------------------------------------------------------------
[2008-08-05 11:51:30] estacuentanolamiro at gmail dot com
Description:
------------
mb_check_encoding segmentation fault
Reproduce code:
---------------
$text = "&· ASDF ASDF ASDF ASDF ASDF ASDF ASDF";
if( mb_check_encoding($text,'HTML-ENTITIES') ) {
$text = htmlentities($text);
}
echo $text;
Expected result:
----------------
string
Actual result:
--------------
Nothing, segmentation fault.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45722&edit=1