PHP Bugs  
php.net | support | documentation | report a bug | advanced search | search howto | statistics | login

go to bug id or search bugs for  

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:*
View/Vote Developer Edit Submission

[5 Aug 2008 11:51am UTC] 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.
[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.


RSS feed | show source 

PHP Copyright © 2001-2009 The PHP Group
All rights reserved.
Last updated: Sat Nov 21 10:30:49 2009 UTC