xref: /PHP-7.2/ext/gd/tests/bug72697.phpt (revision f1d7e3ca)
1--TEST--
2Bug #72697: select_colors write out-of-bounds
3--SKIPIF--
4<?php
5if (!function_exists("imagecreatetruecolor")) die("skip");
6if (PHP_INT_MAX !== 9223372036854775807) die("skip for 64-bit long systems only");
7?>
8--FILE--
9<?php
10
11$img=imagecreatetruecolor(10, 10);
12imagetruecolortopalette($img, false, PHP_INT_MAX / 8);
13?>
14DONE
15--EXPECTF--
16Warning: imagetruecolortopalette(): Number of colors has to be greater than zero and no more than 2147483647 in %sbug72697.php on line %d
17DONE
18