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