1--TEST-- 2Bug #70728 (Type Confusion Vulnerability in PHP_to_XMLRPC_worker) 3--SKIPIF-- 4<?php 5if (!extension_loaded("xmlrpc")) print "skip"; 6?> 7--FILE-- 8<?php 9$obj = new stdClass; 10$obj->xmlrpc_type = 'base64'; 11$obj->scalar = 0x1122334455; 12var_dump(xmlrpc_encode($obj)); 13var_dump($obj); 14?> 15--EXPECTF-- 16string(135) "<?xml version="1.0" encoding="utf-8"?> 17<params> 18<param> 19 <value> 20 <base64>NzM1ODgyMjkyMDU= </base64> 21 </value> 22</param> 23</params> 24" 25object(stdClass)#1 (2) { 26 ["xmlrpc_type"]=> 27 string(6) "base64" 28 ["scalar"]=> 29 int(73588229205) 30} 31