summaryrefslogtreecommitdiff
path: root/ext/json/tests/bug72787.phpt
blob: c08bd18ec9b1fa18bb9d417f352cc06fe5010584 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--TEST--
Bug #72787 (json_decode reads out of bounds)
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
--FILE--
<?php

try {
    var_dump(json_decode('[]', false, 0x100000000));
} catch (\ValueError $e) {
    echo $e->getMessage() . \PHP_EOL;
}

?>
--EXPECTF--
json_decode(): Argument #3 ($depth) must be less than %d