forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug #72749: wddx_deserialize allows illegal memory access
Assigned CVE-IDs: CVE-2016-7129 (cherry picked from commit 426aeb2) Signed-off-by: Lior Kaplan <kaplanlior@gmail.com>
- Loading branch information
1 parent
cdfa5ad
commit 2fb7c78
Showing
2 changed files
with
48 additions
and
6 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