| Bug #45722 | mb_check_encoding() crashes | ||||
|---|---|---|---|---|---|
| Submitted: | 5 Aug 2008 11:51am UTC | Modified: | 16 Oct 2008 1:06am UTC | ||
| From: | estacuentanolamiro at gmail dot com | Assigned to: | moriyoshi | ||
| Status: | Closed | Category: | mbstring related | ||
| Version: | 5.2CVS, 5.3CVS, 6CVS (2008-08-05) | OS: | * | ||
[5 Aug 2008 11:54am UTC] 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;
[5 Aug 2008 12:13pm UTC] jani@php.net
Moriyoshi, verified with all branches.
[16 Oct 2008 1:06am UTC] moriyoshi@php.net
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.

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.