diff options
| author | Christoph M. Becker <cmbecker69@gmx.de> | 2016-10-10 12:05:47 +0200 |
|---|---|---|
| committer | Christoph M. Becker <cmbecker69@gmx.de> | 2016-10-10 12:12:13 +0200 |
| commit | 0f40ca989ab86c24118d1f47aa2c3614a61fa6b6 (patch) | |
| tree | c2b5a01192fb8cc2877486028df81922d299dba1 /ext/gd/tests | |
| parent | 3760bc5407f2905d5b407df9cadc05e44eb2f449 (diff) | |
| parent | fb08216b0802d71f394908a89f987617a7784988 (diff) | |
| download | php-git-0f40ca989ab86c24118d1f47aa2c3614a61fa6b6.tar.gz | |
Merge branch 'PHP-7.0' into PHP-7.1
Diffstat (limited to 'ext/gd/tests')
| -rw-r--r-- | ext/gd/tests/bug73279.phpt | 20 | ||||
| -rw-r--r-- | ext/gd/tests/bug73279_old.phpt | 22 |
2 files changed, 42 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===
diff --git a/ext/gd/tests/bug73279_old.phpt b/ext/gd/tests/bug73279_old.phpt new file mode 100644 index 0000000000..0cbbec34f2 --- /dev/null +++ b/ext/gd/tests/bug73279_old.phpt @@ -0,0 +1,22 @@ +--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 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===
+--XFAIL--
+Bug #330 has not yet been fixed
+--EXPECT--
+color: ffffff
+===DONE===
|
