summaryrefslogtreecommitdiff
path: root/ext/gd/tests/bug43121.phpt
blob: 38668fdfbbcd6c41796223c0928bfd02a39c588f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
Bug #43121 (gdImageFill with IMG_COLOR_TILED crashes httpd)
--SKIPIF--
<?php
    if (!extension_loaded('gd')) die("skip gd extension not available\n");
    if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.0', '<')) {
        die("skip test requires GD 2.2.0 or higher");
    }
?>
--FILE--
<?php
$im = ImageCreate( 200, 100 );
$black = ImageColorAllocate( $im, 0, 0, 0 );

$im_tile = ImageCreateFromGif(__DIR__ . "/bug43121.gif" );
ImageSetTile( $im, $im_tile );
ImageFill( $im, 0, 0, IMG_COLOR_TILED );

ImageDestroy( $im );

print "OK";
?>
--EXPECT--
OK