summaryrefslogtreecommitdiff
path: root/ext/gd/tests/bug73279.phpt
blob: e6c670903966f724e21b62e90fbf007b0d2b4eff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
Bug #73279 (Integer overflow in gdImageScaleBilinearPalette())
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip gd extension not available');
if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.4', '<')) {
    die('skip only for bundled libgd or external libgd >= 2.2.4');
}
?>
--FILE--
<?php
$src = imagecreate(100, 100);
imagecolorallocate($src, 255, 255, 255);
$dst = imagescale($src, 200, 200, IMG_BILINEAR_FIXED);
printf("color: %x\n", imagecolorat($dst, 99, 99));
?>
===DONE===
--EXPECT--
color: ffffff
===DONE===