php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #66815
Patch test.patch revision 2014-03-03 16:20 UTC by remi@php.net
Patch 0001-Fix-NULL-deref-in-gdImageCrop.patch revision 2014-03-03 16:19 UTC by remi@php.net
Patch libgd-test.patch revision 2014-03-03 16:13 UTC by remi@php.net
Patch tests.patch revision 2014-03-03 16:10 UTC by remi@php.net

Patch test.patch for GD related Bug #66815

Patch version 2014-03-03 16:20 UTC

Return to Bug #66815 | Download this patch
Patch Revisions:

Developer: remi@php.net

diff -up ext/gd/tests/bug66356.phpt.orig ext/gd/tests/bug66356.phpt
--- ext/gd/tests/bug66356.phpt.orig	2014-03-03 16:55:47.826375795 +0100
+++ ext/gd/tests/bug66356.phpt	2014-03-03 16:55:57.130408433 +0100
@@ -24,6 +24,8 @@ var_dump(imagecrop($img, array("x" => -2
 // POC #4
 var_dump(imagecrop($img, array("x" => 0x7fffff00, "y" => 0, "width" => 10, "height" => 10)));
 
+// bug 66815
+var_dump(imagecrop($img, array("x" => 0, "y" => 0, "width" => 65535, "height" => 65535)));
 ?>
 --EXPECTF--
 resource(%d) of type (gd)
@@ -35,6 +37,13 @@ Array
     [width] => 10
     [height] => 10
 )
+
+Warning: imagecrop(): gd warning: one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully
+ in %sbug66356.php on line %d
 bool(false)
 resource(%d) of type (gd)
-resource(%d) of type (gd)
\ Pas de fin de ligne à la fin du fichier
+resource(%d) of type (gd)
+
+Warning: imagecrop(): gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
+ in %sbug66356.php on line %d
+bool(false)
\ Pas de fin de ligne à la fin du fichier
 
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Sun Apr 19 17:01:57 2015 UTC