Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
0.7
-
PHP 5.2.6
-
Patch Available
Description
The PHP library uses strlen() and substr() liberally. These functions can be overriden by mbstring with the config "mbstring.func_overload" (http://us.php.net/manual/en/mbstring.overload.php).
When this overloading happens, substr and strlen (among other non-important functions) are no longer binary-safe, and need to be replaced with their mb_* binary safe equivalents.
Attached is a patch that identifies environments where mbstring.func_overloading is set, and automatically switches over use of the non-binarysafe functions to their safe equivalents.