com php-src: Fixed test on 32-bit platforms (split into 32-bit and 64-bit versions): ext/xmlrpc/tests/bug70728.phpt ext/xmlrpc/tests/bug
70728_64bit.phpt

From: Date: Tue, 26 Apr 2016 10:43:18 +0000
Subject: com php-src: Fixed test on 32-bit platforms (split into 32-bit and 64-bit versions): ext/xmlrpc/tests/bug70728.phpt ext/xmlrpc/tests/bug
70728_64bit.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-91842@lists.php.net to get a copy of this message
Commit: 9f389cccfd5b0e0b8407d6d12a1c6b5acd3c4206 Author: Dmitry Stogov <dmitry@zend.com> Tue, 26 Apr 2016 13:43:18 +0300 Parents: c4f69b6dfd6a27767e36312f7cb8474458a13ca6 Branches: PHP-5.6 PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9f389cccfd5b0e0b8407d6d12a1c6b5acd3c4206 Log: Fixed test on 32-bit platforms (split into 32-bit and 64-bit versions) Changed paths: M ext/xmlrpc/tests/bug70728.phpt A ext/xmlrpc/tests/bug70728_64bit.phpt Diff: diff --git a/ext/xmlrpc/tests/bug70728.phpt b/ext/xmlrpc/tests/bug70728.phpt index 5510c33..72f72f8 100644 --- a/ext/xmlrpc/tests/bug70728.phpt +++ b/ext/xmlrpc/tests/bug70728.phpt @@ -3,6 +3,7 @@ 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 @@ -26,5 +27,5 @@ object(stdClass)#1 (2) { ["xmlrpc_type"]=> string(6) "base64" ["scalar"]=> - int(73588229205) + float(73588229205) } diff --git a/ext/xmlrpc/tests/bug70728_64bit.phpt b/ext/xmlrpc/tests/bug70728_64bit.phpt new file mode 100644 index 0000000..3ed5093 --- /dev/null +++ b/ext/xmlrpc/tests/bug70728_64bit..phpt @@ -0,0 +1,31 @@ +--TEST-- +Bug #70728 (Type Confusion Vulnerability in PHP_to_XMLRPC_worker) +--SKIPIF-- +<?php +if (!extension_loaded("xmlrpc")) print "skip"; +if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); +?> +--FILE-- +<?php +$obj = new stdClass; +$obj->xmlrpc_type = 'base64'; +$obj->scalar = 0x1122334455; +var_dump(xmlrpc_encode($obj)); +var_dump($obj); +?> +--EXPECTF-- +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"]=> + int(73588229205) +}

« previous php.cvs (#91842) next »