xmlrpc_set_type() segfaults with valid ISO8601 date string
| Bug #45226 | xmlrpc_set_type() segfaults with valid ISO8601 date string | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2008-06-10 05:12 UTC | Modified: | 2008-09-10 00:10 UTC |
|
||||||||||
| From: | bmn at bmn dot name | Assigned: | ||||||||||||
| Status: | Closed | Package: | XMLRPC-EPI related | |||||||||||
| PHP Version: | 5.2.6 | OS: | * | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2008-06-10 05:12 UTC] 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)
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2008-09-10 00:10 UTC] felipe@php.net