From: starson dot hochschild at mtginfo dot com Operating system: Win32/Linux PHP version: 5.1.6 PHP Bug Type: Reproducible crash Bug description: Passing strtotime a string containing non-separated keywords can crash php
Description: ------------ I know: php5.1.0 has this problem php5.1.6 has this problem php5.0.5 does not have this problem php5.2-win32-200609211830 does not have this problem php6.0-win32-200609211630 does not have this problem I assume: php >= 5.1.0 <= 5.1.6 has this problem php4.x does not have this problem php >= 5.0.0 < 5.1.0 does not have this problem I have tested this on both Win32 and Linux. Reproduce code: --------------- <?php echo "before\n"; // Any of these lines should reproduce the segfault echo strtotime( "lastyear" ); echo strtotime( "skdfhakshdlastyearslkdjflksjd" ); echo strtotime( "lastyearslkdjflksjd" ); echo strtotime( "skdfhakshdlastyear" ); echo strtotime( "thisthursday" ); echo strtotime( "nextyear" ); echo strtotime( "lastmonth" ); echo strtotime( "lastsecond" ); echo "\nafter\n"; ?> Expected result: ---------------- Depending on the line above and how it is determined to handle non-separated keywords: before 1127397439 after ---- OR ---- before after Actual result: -------------- before Segmentation fault -- Edit bug report at http://bugs.php.net/?id=38927&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38927&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38927&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38927&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38927&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38927&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38927&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38927&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38927&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38927&r=support Expected behavior: http://bugs.php.net/fix.php?id=38927&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38927&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38927&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38927&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38927&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38927&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38927&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38927&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38927&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38927&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38927&r=mysqlcfg