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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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: Tue Dec 03 17:01:29 2024 UTC