ID:               45226
 Updated by:       [EMAIL PROTECTED]
 Reported By:      bmn at bmn dot name
-Status:           Verified
+Status:           Closed
 Bug Type:         XMLRPC-EPI related
 Operating System: *
 PHP Version:      5.2.6
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Fixed in 5.2.7, 5.3, HEAD.


Previous Comments:
------------------------------------------------------------------------

[2008-09-09 15:17:39] ndeschildre at gmail dot com

Patch found on the original xmlrpc-epi lib:

http://xmlrpc-epi.cvs.sourceforge.net/xmlrpc-epi/xmlrpc/src/xmlrpc.c?r1=1.31&r2=1.32

------------------------------------------------------------------------

[2008-06-10 05:12:19] bmn at bmn dot name

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 this bug report at http://bugs.php.net/?id=45226&edit=1

Reply via email to