php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45722 mb_check_encoding() crashes
Submitted: 2008-08-05 11:51 UTC Modified: 2008-10-16 01:06 UTC
From: estacuentanolamiro at gmail dot com Assigned: moriyoshi (profile)
Status: Closed Package: mbstring related
PHP Version: 5.2CVS, 5.3CVS, 6CVS (2008-08-05) OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: estacuentanolamiro at gmail dot com
New email:
PHP Version: OS:

 

 [2008-08-05 11:51 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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-05 11:54 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;
 [2008-08-05 12:13 UTC] jani@php.net
Moriyoshi, verified with all branches. 
 [2008-10-16 01:06 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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 07:01:29 2024 UTC