ID: 42189 User updated by: giunta dot gaetano at gmail dot com Reported By: giunta dot gaetano at gmail dot com Status: Open Bug Type: XMLRPC-EPI related Operating System: windows xp or 2000 PHP Version: 5.2.3 New Comment:
As a side note, mostly to comments on #22468 - the official epi lib has not seen any cvs commit in about 5 years, and the php engine is possibly the biggest user of the lib, so I would not mind too much forking the underlying codebase (bug #69492 was opened there after the php devs refused to fix 22468, but it's till open after 4,5 years...) Previous Comments: ------------------------------------------------------------------------ [2007-08-02 20:56:37] giunta dot gaetano at gmail dot com Description: ------------ Trying to cast a non-iso8601 conforming string to an xmlrpc datetime object crashes php. This happens if the characters in position 0 to 6 are too high in the ascii table, presumably moving the converted date too far away in the future This is repro with php 447 and 523 Note that it 'might' be the same bug as #22468 (the cause looks the same allright), with the difference that you get corrupted data on gentoo, and a core dump on winblows... Reproduce code: --------------- <?php // char ~ is 127 in ascii table, in xmlrpc.c '0' is subtracted, so we end up with the number 79 used for every digit of every date part // year = 79*1000+79*100+79*10+79, etc... // from date_from_ISO8601, in line 161 in xmlrpc.c // called from set_zval_xmlrpc_type in xmlrpc-epi-php.c $params = '~~~~~~~~~~~~~~~~~~'; $ok = xmlrpc_set_type ( $params, 'datetime' ); var_dump($ok); ?> Expected result: ---------------- false Actual result: -------------- CRASH'N'BURN ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42189&edit=1