|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47399 mb_check_encoding returns true with illegal SJIS string
Submitted: 2009-02-16 00:05 UTC Modified: 2009-02-16 01:58 UTC
From: for-bugs at hnw dot jp Assigned: moriyoshi
Status: Closed Package: mbstring related
PHP Version: 5.2.9RC2 OS: any
Private report: No CVE-ID:
 [2009-02-16 00:05 UTC] for-bugs at hnw dot jp
mb_check_encoding returns true when specific invalid "SJIS" or "SJIS-win" string.

Reproduce code:

var_dump(mb_check_encoding("\x81\x3A", "SJIS-win"));

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-16 00:11 UTC] for-bugs at hnw dot jp
Proposed fix is here:
 [2009-02-16 00:28 UTC]
Thanks for the patch.

Assigned to maintainer.
 [2009-02-16 01:58 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 08:01:41 2015 UTC