Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix bug #72749: wddx_deserialize allows illegal memory access
- Loading branch information
Showing
2 changed files
with
46 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| --TEST-- | ||
| Bug #72749: wddx_deserialize allows illegal memory access | ||
| --SKIPIF-- | ||
| <?php | ||
| if (!extension_loaded('wddx')) { | ||
| die('skip. wddx not available'); | ||
| } | ||
| ?> | ||
| --FILE-- | ||
| <?php | ||
| $xml = <<<XML | ||
| <?xml version='1.0'?> | ||
| <!DOCTYPE wddxPacket SYSTEM 'wddx_0100.dtd'> | ||
| <wddxPacket version='1.0'> | ||
| <header/> | ||
| <data> | ||
| <struct> | ||
| <var name='aDateTime3'> | ||
| <dateTime>2\r2004-09-10T05:52:49+00</dateTime> | ||
| </var> | ||
| </struct> | ||
| </data> | ||
| </wddxPacket> | ||
| XML; | ||
|
|
||
| $array = wddx_deserialize($xml); | ||
| var_dump($array); | ||
| ?> | ||
| --EXPECT-- | ||
| array(1) { | ||
| ["aDateTime3"]=> | ||
| string(24) "2 | ||
| 2004-09-10T05:52:49+00" | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters