From:             bmn at bmn dot name
Operating system: Linux
PHP version:      5.2.6
PHP Bug Type:     Reproducible crash
Bug description:  xmlrpc_set_type fails with valid ISO8601 date string

Description:
------------
PHP crashes when trying to call xmlrpc_set_type with a correctly formatted
ISO8601 datetime string from the date() function. 

Note that if you specify a datetime string without the +/-00:00, it will
work.
If you specify the timezome information (as the constant DATE_ISO8601
does), php will crash.


Reproduce code:
---------------
// this code breaks
$d = date(DATE_ISO8601);
xmlrpc_set_type($d, 'datetime');
echo xmlrpc_encode_request('method.call', array('date' => $d));


//working code
$d = '2008-01-01 20:00:00';
xmlrpc_set_type($d, 'datetime');
echo xmlrpc_encode_request('method.call', array('date' => $d));

Expected result:
----------------
<methodCall>
<methodName>method.call</methodName>
<params>
 <param>
  <value>
   <struct>
    <member>
     <name>date</name>
     <value>
      <dateTime.iso8601>20080101T20:00:00</dateTime.iso8601>
     </value>
    </member>
   </struct>
  </value>
 </param>
</params>
</methodCall>

Actual result:
--------------
*** stack smashing detected ***: php terminated
Aborted (core dumped)




-- 
Edit bug report at http://bugs.php.net/?id=45226&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45226&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45226&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45226&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45226&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45226&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45226&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45226&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45226&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45226&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45226&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45226&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45226&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45226&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45226&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45226&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45226&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45226&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45226&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45226&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45226&r=mysqlcfg

Reply via email to