bug72787.phpt 357 B

123456789101112131415
  1. --TEST--
  2. Bug #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. var_dump(json_decode('[]', false, 0x100000000));
  9. ?>
  10. --EXPECTF--
  11. Warning: json_decode(): Depth must be lower than %d in %s on line %d
  12. NULL