We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9db113 commit 6b2dbb8Copy full SHA for 6b2dbb8
ext/gd/tests/bug77269.phpt
@@ -0,0 +1,18 @@
1
+--TEST--
2
+Bug #77269 (Potential unsigned underflow in gdImageScale)
3
+--SKIPIF--
4
+<?php
5
+if (!extension_loaded('gd')) die('skip gd extension not available');
6
+if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
7
+?>
8
+--INI--
9
+memory_limit=2G
10
+--FILE--
11
12
+$im = imagecreate(2**28, 1);
13
+imagescale($im, 1, 1, IMG_TRIANGLE);
14
+
15
16
+--EXPECTF--
17
+Warning: imagescale():%S Product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
18
+ in %s on line %d
0 commit comments