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

var_dump(json_decode('[]', false, 0x100000000));

?>
--EXPECTF--

Warning: json_decode(): Depth must be lower than %d in %s on line %d
NULL