forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* PHP-7.0: (22 commits) Fix bug #72293 - Heap overflow in mysqlnd related to BIT fields I don't think 8cceb01 is needed Fix test Add check in fgetcsv in case sizeof(unit) != sizeof(size_t) Fix bug #73065: Out-Of-Bounds Read in php_wddx_push_element of wddx.c Fix bug #73035 (Out of bound when verify signature of tar phar in phar_parse_tarfile) Fix bug #73052 - Memory Corruption in During Deserialized-object Destruction Fix bug #73029 - Missing type check when unserializing SplArray Fix bug #72860: wddx_deserialize use-after-free Fix bug #73007: add locale length check Fix bug #72928 - Out of bound when verify signature of zip phar in phar_parse_zipfile sync NEWS Revert "Merge branch 'PHP-5.6' into PHP-7.0" Merge branch 'PHP-5.6' into PHP-7.0 Merge branch 'PHP-5.6' into PHP-7.0 Revert "Revert "Merge branch 'PHP-5.6' into PHP-7.0"" fix version sync NEWS Fix bug #72957 set versions ...
- Loading branch information
Showing
16 changed files
with
249 additions
and
31 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
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
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,18 @@ | ||
--TEST-- | ||
Phar: #72928 (Out of bound when verify signature of zip phar in phar_parse_zipfile) | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("phar")) die("skip"); ?> | ||
--FILE-- | ||
<?php | ||
chdir(__DIR__); | ||
try { | ||
$phar = new PharData('bug72928.zip'); | ||
var_dump($phar); | ||
} catch(UnexpectedValueException $e) { | ||
print $e->getMessage()."\n"; | ||
} | ||
?> | ||
DONE | ||
--EXPECTF-- | ||
phar error: signature cannot be read in zip-based phar "%sbug72928.zip" | ||
DONE |
Binary file not shown.
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,18 @@ | ||
--TEST-- | ||
Phar: #73035 (Out of bound when verify signature of tar phar in phar_parse_tarfile) | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("phar")) die("skip"); ?> | ||
--FILE-- | ||
<?php | ||
chdir(__DIR__); | ||
try { | ||
$phar = new PharData('bug73035.tar'); | ||
var_dump($phar); | ||
} catch(UnexpectedValueException $e) { | ||
print $e->getMessage()."\n"; | ||
} | ||
?> | ||
DONE | ||
--EXPECTF-- | ||
phar error: tar-based phar "%sbug73035.tar" signature cannot be read | ||
DONE |
Binary file not shown.
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
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
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
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
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,16 @@ | ||
--TEST-- | ||
Bug #73029: Missing type check when unserializing SplArray | ||
--FILE-- | ||
<?php | ||
try { | ||
$a = 'C:11:"ArrayObject":19:0x:i:0;r:2;;m:a:0:{}}'; | ||
$m = unserialize($a); | ||
$x = $m[2]; | ||
} catch(UnexpectedValueException $e) { | ||
print $e->getMessage() . "\n"; | ||
} | ||
?> | ||
DONE | ||
--EXPECTF-- | ||
Error at offset 10 of 19 bytes | ||
DONE |
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,18 @@ | ||
--TEST-- | ||
Bug #73052: Memory Corruption in During Deserialized-object Destruction | ||
--FILE-- | ||
<?php | ||
|
||
class obj { | ||
var $ryat; | ||
public function __destruct() { | ||
$this->ryat = null; | ||
} | ||
} | ||
|
||
$poc = 'O:3:"obj":1:{'; | ||
var_dump(unserialize($poc)); | ||
?> | ||
--EXPECTF-- | ||
Notice: unserialize(): Error at offset 13 of 13 bytes in %sbug73052.php on line %d | ||
bool(false) |
This file was deleted.
Oops, something went wrong.
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,27 @@ | ||
--TEST-- | ||
Bug #72860: wddx_deserialize use-after-free | ||
--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'> | ||
<recordset fieldNames='F'> | ||
<field name='F'> | ||
</recordset> | ||
</wddxPacket> | ||
XML; | ||
|
||
var_dump(wddx_deserialize($xml)); | ||
?> | ||
DONE | ||
--EXPECT-- | ||
NULL | ||
DONE |
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,98 @@ | ||
--TEST-- | ||
Bug #73065: Out-Of-Bounds Read in php_wddx_push_element of wddx.c | ||
--SKIPIF-- | ||
<?php | ||
if (!extension_loaded('wddx')) { | ||
die('skip. wddx not available'); | ||
} | ||
?> | ||
--FILE-- | ||
<?php | ||
|
||
$xml1 = <<<XML | ||
<?xml version='1.0' ?> | ||
<!DOCTYPE et SYSTEM 'w'> | ||
<wddxPacket ven='1.0'> | ||
<array> | ||
<var Name="name"> | ||
<boolean value="keliu"></boolean> | ||
</var> | ||
<var name="1111"> | ||
<var name="2222"> | ||
<var name="3333"></var> | ||
</var> | ||
</var> | ||
</array> | ||
</wddxPacket> | ||
XML; | ||
|
||
$xml2 = <<<XML | ||
<?xml version='1.0' ?> | ||
<!DOCTYPE et SYSTEM 'w'> | ||
<wddxPacket ven='1.0'> | ||
<array> | ||
<char Name="code"> | ||
<boolean value="keliu"></boolean> | ||
</char> | ||
</array> | ||
</wddxPacket> | ||
XML; | ||
|
||
$xml3 = <<<XML | ||
<?xml version='1.0' ?> | ||
<!DOCTYPE et SYSTEM 'w'> | ||
<wddxPacket ven='1.0'> | ||
<array> | ||
<boolean Name="value"> | ||
<boolean value="keliu"></boolean> | ||
</boolean> | ||
</array> | ||
</wddxPacket> | ||
XML; | ||
|
||
$xml4 = <<<XML | ||
<?xml version='1.0' ?> | ||
<!DOCTYPE et SYSTEM 'w'> | ||
<wddxPacket ven='1.0'> | ||
<array> | ||
<recordset Name="fieldNames"> | ||
<boolean value="keliu"></boolean> | ||
</recordset> | ||
</array> | ||
</wddxPacket> | ||
XML; | ||
|
||
$xml5 = <<<XML | ||
<?xml version='1.0' ?> | ||
<!DOCTYPE et SYSTEM 'w'> | ||
<wddxPacket ven='1.0'> | ||
<array> | ||
<field Name="name"> | ||
<boolean value="keliu"></boolean> | ||
</field> | ||
</array> | ||
</wddxPacket> | ||
XML; | ||
|
||
for($i=1;$i<=5;$i++) { | ||
$xmlvar = "xml$i"; | ||
$array = wddx_deserialize($$xmlvar); | ||
var_dump($array); | ||
} | ||
?> | ||
DONE | ||
--EXPECTF-- | ||
array(0) { | ||
} | ||
array(0) { | ||
} | ||
array(0) { | ||
} | ||
array(1) { | ||
[0]=> | ||
array(0) { | ||
} | ||
} | ||
array(0) { | ||
} | ||
DONE |
Oops, something went wrong.