1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 00:18:23 +02:00
Files
archived-php-src/ext/standard/tests/serialize/bug74101.phpt
T
Nikita Popov 4377a8ea41 Sanity-check array/object lengths during unserialization
Avoid OOM conditions in unserialize due to overly large array or
object length specifications.
2019-09-16 11:38:35 +02:00

13 lines
372 B
PHP

--TEST--
Bug #74101: Unserialize Heap Use-After-Free (READ: 1) in zval_get_type
--FILE--
<?php
$s = 'O:9:"Exception":799999999999999999999999999997:0i:0;a:0:{}i:2;i:0;i:0;R:2;';
var_dump(unserialize($s));
?>
--EXPECTF--
Warning: unserialize(): %s in %sbug74101.php on line %d
Notice: unserialize(): Error at offset 46 of 74 bytes in %sbug74101.php on line %d
bool(false)