#47399 [Asn->Csd]: mb_check_encoding returns true with illegal SJIS string
| From: | moriyoshi@php.net | Date: | Mon, 16 Feb 2009 01:58:28 +0000 |
| Subject: | #47399 [Asn->Csd]: mb_check_encoding returns true with illegal SJIS string | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-133860@lists.php.net to get a copy of this message | ||
ID: 47399
Updated by: moriyoshi@php.net
Reported By: for-bugs at hnw dot jp
-Status: Assigned
+Status: Closed
Bug Type: mbstring related
Operating System: any
PHP Version: 5.2.9RC2
Assigned To: moriyoshi
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2009-02-16 00:28:01] felipe@php.net
Thanks for the patch.
Assigned to maintainer.
------------------------------------------------------------------------
[2009-02-16 00:11:36] for-bugs at hnw dot jp
Proposed fix is here:
http://hnw.sakura.ne.jp/mb_check_encoding.47399.patch.txt
------------------------------------------------------------------------
[2009-02-16 00:05:52] for-bugs at hnw dot jp
Description:
------------
mb_check_encoding returns true when specific invalid "SJIS" or
"SJIS-win" string.
Reproduce code:
---------------
<?php
var_dump(mb_check_encoding("\x81\x3A", "SJIS-win"));
Expected result:
----------------
bool(false)
Actual result:
--------------
bool(true)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47399&edit=1