xref: /PHP-5.6/ext/standard/tests/file/bug72114.phpt (revision 4dd03651)
1--TEST--
2Bug #72114 (Integer underflow / arbitrary null write in fread/gzread)
3--SKIPIF--
4<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
5--FILE--
6<?php
7ini_set('memory_limit', "2500M");
8$fp = fopen("/dev/zero", "r");
9fread($fp, 2147483648);
10?>
11Done
12--EXPECTF--
13Warning: fread(): Length parameter must be no more than 2147483647 in %s%ebug72114.php on line %d
14Done
15