diff options
Diffstat (limited to 'ext/gd/tests/bug73279.phpt')
-rw-r--r-- | ext/gd/tests/bug73279.phpt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/gd/tests/bug73279.phpt b/ext/gd/tests/bug73279.phpt new file mode 100644 index 0000000000..e6c6709039 --- /dev/null +++ b/ext/gd/tests/bug73279.phpt @@ -0,0 +1,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===
|