From: jakerator at mail dot ru Operating system: win32 PHP version: 4.3.4 PHP Bug Type: *Regular Expressions Bug description: /<tag1>(\n|.)*<\/tag1>/ - this expression crash PHP, while processing long text
Description: ------------ Crassh PHP while processing perl-regular expressions with (\n|.)* or (\s|.)* . PHP crashs only if processing text is too long. Reproduce code: --------------- $txt="<tag1> sadf <....more than 2000 symbols ....> sdf asdf adsf<tag2>"; $res=preg_match("/<tag1>(\n|.)*<\/tag2>/",$txt,$matches); Expected result: ---------------- PHP and Apache wait for a long time or crash immediatly. -- Edit bug report at http://bugs.php.net/?id=27492&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27492&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27492&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27492&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27492&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27492&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27492&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27492&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27492&r=support Expected behavior: http://bugs.php.net/fix.php?id=27492&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27492&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27492&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27492&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27492&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27492&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27492&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27492&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27492&r=float