From: giunta dot gaetano at gmail dot com Operating system: windows xp or 2000 PHP version: 5.2.3 PHP Bug Type: XMLRPC-EPI related Bug description: xmlrpc_set_type crashes php
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 bug report at http://bugs.php.net/?id=42189&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42189&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42189&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42189&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42189&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42189&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42189&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42189&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42189&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42189&r=support Expected behavior: http://bugs.php.net/fix.php?id=42189&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42189&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42189&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42189&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42189&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42189&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42189&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42189&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42189&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42189&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42189&r=mysqlcfg