ID: 40004 Updated by: [EMAIL PROTECTED] Reported By: php at koterov dot ru -Status: Open +Status: Bogus Bug Type: PCRE related Operating System: Windows XP PHP Version: 4.4.4 New Comment:
First of all, it's a PCRE library problem. And it's fixed in newer PCRE versions which are bundled in recent PHP releases. Previous Comments: ------------------------------------------------------------------------ [2007-01-03 00:16:40] php at koterov dot ru This is also reproducible in command-line php.exe PHP 4.4.4 PHP 5.1.6 (!) Cannot reproduce on PHP 5.2.0. ------------------------------------------------------------------------ [2007-01-03 00:10:57] php at koterov dot ru Description: ------------ Seems preg_match with /u modifier corrupts process memory or returns pointer to nirvana instead of pointer to a string. Reproduce code: --------------- <? preg_match('/(.{0,20})$/us', " ", $m); var_export($m); ?> Expected result: ---------------- space Actual result: -------------- something like array ( 0 => ' kjwekwjn', 1 => ' wereinoiu', ) where "kjwekwjn" and "wereinoiu" are random strings with random binary data (useless to copy-paste them here). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40004&edit=1