1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 18:22:42 +01:00
Files
archived-php-src/ext/xmlrpc/tests/bug70728.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

32 lines
626 B
PHP

--TEST--
Bug #70728 (Type Confusion Vulnerability in PHP_to_XMLRPC_worker)
--SKIPIF--
<?php
if (!extension_loaded("xmlrpc")) print "skip";
if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
?>
--FILE--
<?php
$obj = new stdClass;
$obj->xmlrpc_type = 'base64';
$obj->scalar = 0x1122334455;
var_dump(xmlrpc_encode($obj));
var_dump($obj);
?>
--EXPECT--
string(135) "<?xml version="1.0" encoding="utf-8"?>
<params>
<param>
<value>
<base64>NzM1ODgyMjkyMDU=&#10;</base64>
</value>
</param>
</params>
"
object(stdClass)#1 (2) {
["xmlrpc_type"]=>
string(6) "base64"
["scalar"]=>
float(73588229205)
}