xref: /php-src/ext/gd/tests/bug73957.phpt (revision 23a55bab)
1--TEST--
2Bug #73957 (signed integer conversion in imagescale())
3--EXTENSIONS--
4gd
5--SKIPIF--
6<?php
7if (PHP_INT_SIZE != 8) die('skip this test is for 64bit platforms only');
8?>
9--FILE--
10<?php
11$im = imagecreate(8, 8);
12
13try {
14	$im = imagescale($im, 0x100000001, 1);
15	// which is not supposed to happen
16	var_dump(imagesx($im));
17} catch (\ValueError $e) {
18	echo $e->getMessage();
19}
20?>
21--EXPECTF--
22imagescale(): Argument #2 ($width) must be between 1 and %d
23