From 9f389cccfd5b0e0b8407d6d12a1c6b5acd3c4206 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 26 Apr 2016 13:43:18 +0300 Subject: Fixed test on 32-bit platforms (split into 32-bit and 64-bit versions) --- ext/xmlrpc/tests/bug70728.phpt | 3 ++- ext/xmlrpc/tests/bug70728_64bit.phpt | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 ext/xmlrpc/tests/bug70728_64bit.phpt (limited to 'ext/xmlrpc/tests') diff --git a/ext/xmlrpc/tests/bug70728.phpt b/ext/xmlrpc/tests/bug70728.phpt index 5510c33936..72f72f85b0 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-- --FILE-- 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 0000000000..3ed5093918 --- /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-- + +--FILE-- +xmlrpc_type = 'base64'; +$obj->scalar = 0x1122334455; +var_dump(xmlrpc_encode($obj)); +var_dump($obj); +?> +--EXPECTF-- +string(135) " + + + + NzM1ODgyMjkyMDU= + + + +" +object(stdClass)#1 (2) { + ["xmlrpc_type"]=> + string(6) "base64" + ["scalar"]=> + int(73588229205) +} -- cgit v1.2.1