xref: /PHP-7.3/ext/wddx/tests/bug72749.phpt (revision 426aeb28)
1--TEST--
2Bug #72749: wddx_deserialize allows illegal memory access
3--SKIPIF--
4<?php
5if (!extension_loaded('wddx')) {
6    die('skip. wddx not available');
7}
8?>
9--FILE--
10<?php
11$xml = <<<XML
12<?xml version='1.0'?>
13<!DOCTYPE wddxPacket SYSTEM 'wddx_0100.dtd'>
14<wddxPacket version='1.0'>
15<header/>
16        <data>
17                <struct>
18                     <var name='aDateTime3'>
19                         <dateTime>2\r2004-09-10T05:52:49+00</dateTime>
20                     </var>
21                 </struct>
22        </data>
23</wddxPacket>
24XML;
25
26$array = wddx_deserialize($xml);
27var_dump($array);
28?>
29--EXPECT--
30array(1) {
31  ["aDateTime3"]=>
32  string(24) "2
332004-09-10T05:52:49+00"
34}
35