xref: /PHP-7.1/ext/json/tests/bug72787.phpt (revision 113213f0)
1--TEST--
2Bug #72787 (json_decode reads out of bounds)
3--SKIPIF--
4<?php if (!extension_loaded("json")) print "skip"; ?>
5<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
6--FILE--
7<?php
8
9var_dump(json_decode('[]', false, 0x100000000));
10
11?>
12--EXPECTF--
13Warning: json_decode(): Depth must be lower than %d in %s on line %d
14NULL
15