From: amoljak at cox dot net Operating system: Windows 2000 Server PHP version: 4.3.6 PHP Bug Type: Reproducible crash Bug description: Wrong regex crashes server
Description: ------------ Note the extra ] in the regex. Try to load this page three times and it will crash the third time. Reproduce code: --------------- <?php $filecontent = "my name is amol"; $regex = "/(^|[^a-zA-Z0-9-])([Nn]on[-s? []]]degrees? [Ss]tudents?)([^a-zA-Z0-9-]|$)/es"; //preg_match_all($regex, $filecontent , $matches, PREG_OFFSET_CAPTURE); preg_match($regex, $filecontent , $matches, PREG_OFFSET_CAPTURE); print "matches = $matches<br>"; ?> Expected result: ---------------- This is from end user's code and I don't know what he expected. But he was able to crash the server... thats bad. -- Edit bug report at http://bugs.php.net/?id=28875&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28875&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28875&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28875&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28875&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28875&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28875&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28875&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28875&r=support Expected behavior: http://bugs.php.net/fix.php?id=28875&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28875&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28875&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28875&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28875&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28875&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28875&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28875&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28875&r=float