]> granicus.if.org Git - php/commitdiff
- #39508, add test (imagefill crashes with small image)
authorPierre Joye <pajoye@php.net>
Sun, 10 Dec 2006 01:58:50 +0000 (01:58 +0000)
committerPierre Joye <pajoye@php.net>
Sun, 10 Dec 2006 01:58:50 +0000 (01:58 +0000)
NEWS
ext/gd/tests/bug39508.phpt [new file with mode: 0644]

diff --git a/NEWS b/NEWS
index 424b55a45296ec06645ea8a223b3bbc70c821bf5..55f7477d0ec4cd04ac8a35df1d7c20ea431312c8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -102,6 +102,8 @@ PHP                                                                        NEWS
   ZEND_MM_ALIGNED_MIN_HEADER_SIZE). (wharmby at uk dot ibm dot com, Dmitry)
 - Fixed bug #39527 (Failure to retrieve results when multiple unbuffered,
   prepared statements are used in pdo_mysql). (Ilia)
+- Fixed bug #39508 (imagefill crashes with small images 3 pixels or less)
+  (Pierre)
 - Fixed bug #39483 (Problem with handling of \ char in prepared statements).
   (Ilia, suhachov at gmail dot com)
 - Fixed bug #39458 (ftp_nlist() returns false on empty dirs). (Nuno)
diff --git a/ext/gd/tests/bug39508.phpt b/ext/gd/tests/bug39508.phpt
new file mode 100644 (file)
index 0000000..9e86efc
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+Bug #39508 (imagefill crashes with small images 3 pixels or less)
+--SKIPIF--
+<?php 
+       if (!extension_loaded('gd')) die("skip gd extension not available\n"); 
+       if (!GD_BUNDLED) die('skip external GD libraries always fail');
+?>
+--FILE--
+<?php
+$im = imagecreatetruecolor(3,1);
+$bgcolor = imagecolorallocatealpha($im,255, 255, 0, 0);
+imagefill($im,0,0,$bgcolor);
+print_r(imagecolorat($im, 1,0));
+?>
+--EXPECTF--
+16776960