xref: /PHP-7.0/ext/gd/tests/bug72709.phpt (revision f5622f5c)
1--TEST--
2Bug #72709 (imagesetstyle() causes OOB read for empty $styles)
3--SKIPIF--
4<?php
5if (!extension_loaded('gd')) die('skip ext/gd not available');
6?>
7--FILE--
8<?php
9$im = imagecreatetruecolor(1, 1);
10var_dump(imagesetstyle($im, array()));
11imagesetpixel($im, 0, 0, IMG_COLOR_STYLED);
12imagedestroy($im);
13?>
14====DONE====
15--EXPECTF--
16Warning: imagesetstyle(): styles array must not be empty in %s%ebug72709.php on line %d
17bool(false)
18====DONE====
19