xref: /PHP-7.4/ext/gd/tests/bug43121.phpt (revision 26dfce7f)
1--TEST--
2Bug #43121 (gdImageFill with IMG_COLOR_TILED crashes httpd)
3--SKIPIF--
4<?php
5	if (!extension_loaded('gd')) die("skip gd extension not available\n");
6	if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.0', '<')) {
7		die("skip test requires GD 2.2.0 or higher");
8	}
9?>
10--FILE--
11<?php
12$im = ImageCreate( 200, 100 );
13$black = ImageColorAllocate( $im, 0, 0, 0 );
14
15$im_tile = ImageCreateFromGif(__DIR__ . "/bug43121.gif" );
16ImageSetTile( $im, $im_tile );
17ImageFill( $im, 0, 0, IMG_COLOR_TILED );
18
19ImageDestroy( $im );
20
21print "OK";
22?>
23--EXPECT--
24OK
25