Skip to content

Commit 6b2dbb8

Browse files
committed
readd test 77269
1 parent e9db113 commit 6b2dbb8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

ext/gd/tests/bug77269.phpt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
<?php
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

Comments
 (0)