#38927 [Opn->Csd]: Passing strtotime a string containing non-separated keywords can crash php
| From: | iliaa@php.net | Date: | Fri, 22 Sep 2006 21:18:52 +0000 |
| Subject: | #38927 [Opn->Csd]: Passing strtotime a string containing non-separated keywords can crash php | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-102547@lists.php.net to get a copy of this message | ||
ID: 38927
Updated by: iliaa@php.net
Reported By: starson dot hochschild at mtginfo dot com
-Status: Open
+Status: Closed
Bug Type: Reproducible crash
Operating System: Win32/Linux
PHP Version: 5.1.6
New Comment:
5.2.0 is the next 5.X release, there is not going to be 5.1.7
Previous Comments:
------------------------------------------------------------------------
[2006-09-22 21:15:12] starson dot hochschild at mtginfo dot com
As noted in my original description I know that it works in 5.2.x. I
submitted this as a bug for 5.1.6 so if there is another revision on
the 5.1 line the fix would be in it. The moment 5.2.0 is officially
released this issue is void.
------------------------------------------------------------------------
[2006-09-22 21:09:25] iliaa@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
Seems to work in latest CVS, no memory errors are being
reported by valgrind either.
------------------------------------------------------------------------
[2006-09-22 14:11:25] starson dot hochschild at mtginfo dot com
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 this bug report at http://bugs.php.net/?id=38927&edit=1