xref: /PHP-7.4/ext/gd/tests/bug77269.phpt (revision dfd8237a)
1--TEST--
2Bug #77269 (Potential unsigned underflow in gdImageScale)
3--SKIPIF--
4<?php
5if (!extension_loaded('gd')) die('skip gd extension not available');
6if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
7?>
8--INI--
9memory_limit=2G
10--FILE--
11<?php
12$im = imagecreate(2**28, 1);
13if(is_resource($im)) {
14	imagescale($im, 1, 1, IMG_TRIANGLE);
15}
16?>
17===DONE===
18--EXPECTF--
19Warning: imagescale():%S product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
20 in %s on line %d
21===DONE===
22