ZF-11473: Infinite loop in Zend_Date
Description
The following code will result in an infinite loop in Zend_Date constructor.
<?php $date_xml = "00-11130000000"; $date_obj = new Zend_Date( $date_xml, "yyyyMMddHHmmss" ); echo $date_obj->toString("yyyy-MM-dd HH:mm:ss"); ?>
Comments
Posted by Sebastian Keßler (bytehoven) on 2011-06-25T11:05:15.000+0000
There is also an infinite loop when giving values higher than 1.0E+308(php float range) to the constructor. Maybe there should be some range checks?
Here´s the code leads to infinite loop, because of the float inv (e.g. with 1.0E+309) Zend_Date_DateObject protected function date() while (abs($tempstamp) > 0x7FFFFFFF) { $tempstamp -= (86400 * 23376); }