1--TEST--
2Unserializing payload with unrealistically large element counts
3--FILE--
4<?php
5
6var_dump(unserialize("a:1000000000:{}"));
7var_dump(unserialize("O:1000000000:\"\":0:{}"));
8var_dump(unserialize("O:1:\"X\":1000000000:{}"));
9var_dump(unserialize("C:1:\"X\":1000000000:{}"));
10
11?>
12--EXPECTF--
13Notice: unserialize(): Error at offset 14 of 15 bytes in %s on line %d
14bool(false)
15
16Notice: unserialize(): Error at offset 2 of 20 bytes in %s on line %d
17bool(false)
18
19Notice: unserialize(): Error at offset 18 of 21 bytes in %s on line %d
20bool(false)
21
22Warning: Insufficient data for unserializing - 1000000000 required, 1 present in %s on line %d
23
24Notice: unserialize(): Error at offset 20 of 21 bytes in %s on line %d
25bool(false)
26