#39791 [NEW]: PHP crashes when sending a specific string to strtotime

From: Date: Mon, 11 Dec 2006 02:14:07 +0000
Subject: #39791 [NEW]: PHP crashes when sending a specific string to strtotime
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-106172@lists.php.net to get a copy of this message
From: closer9 at gmail dot com Operating system: Linux version 2.6.15-23-server PHP version: 5.2.0 PHP Bug Type: Reproducible crash Bug description: PHP crashes when sending a specific string to strtotime Description: ------------ Sending the following string to strtotime results in PHP crashing. PHPinfo: http://www.neg9.com/info.php Reproduce code: --------------- $str = "999999999999999999999999999999999999999999 days ago"; // Taken from the PHP manual if (($timestamp = strtotime($str)) === false) { echo "The string ($str) is bogus"; } else { echo "$str == " . date('l dS of F Y h:i:s A', $timestamp); } Expected result: ---------------- The string (999999999999999999999999999999999999999999 days ago) is bogus Actual result: -------------- PHP crash. Error from apache log: [notice] child pid 10088 exit signal Segmentation fault (11) -- Edit bug report at http://bugs.php.net/?id=39791&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39791&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39791&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39791&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39791&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39791&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39791&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39791&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39791&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39791&r=support Expected behavior: http://bugs.php.net/fix.php?id=39791&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39791&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39791&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39791&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39791&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39791&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39791&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39791&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39791&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39791&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39791&r=mysqlcfg

« previous php.bugs (#106172) next »