xref: /php-src/ext/gd/tests/bug72709.phpt (revision 5853cdb7)
1--TEST--
2Bug #72709 (imagesetstyle() causes OOB read for empty $styles)
3--EXTENSIONS--
4gd
5--FILE--
6<?php
7$im = imagecreatetruecolor(1, 1);
8
9try {
10    var_dump(imagesetstyle($im, array()));
11}
12catch (\Error $ex) {
13    echo $ex->getMessage() . "\n";
14}
15
16imagesetpixel($im, 0, 0, IMG_COLOR_STYLED);
17imagedestroy($im);
18?>
19====DONE====
20--EXPECT--
21imagesetstyle(): Argument #2 ($style) must not be empty
22====DONE====
23