Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
69 additions
and
2 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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,35 @@ | |||
--TEST-- | |||
Bug 72790: wddx_deserialize null dereference with invalid xml | |||
--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'> | |||
|array> | |||
<var name="XXXX"> | |||
<boolean value="this"> | |||
</boolean> | |||
</var> | |||
<var name="YYYY"> | |||
<var name="UUUU"> | |||
<var name="EZEZ"> | |||
</var> | |||
</var> | |||
</var> | |||
</array> | |||
</wddxPacket> | |||
XML; | |||
|
|||
$array = wddx_deserialize($xml); | |||
var_dump($array); | |||
?> | |||
--EXPECT-- | |||
NULL |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,28 @@ | |||
--TEST-- | |||
Bug #72799: wddx_deserialize null dereference in php_wddx_pop_element | |||
--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"> | |||
<var name="XXXX"> | |||
<boolean value="1"> | |||
<dateTime>1998-06-12T04:32:12+00</dateTime> | |||
</boolean> | |||
</var> | |||
</wddxPacket> | |||
XML; | |||
|
|||
$array = wddx_deserialize($xml); | |||
var_dump($array); | |||
?> | |||
--EXPECT-- | |||
NULL |
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