mirror of
https://github.com/php/php-src.git
synced 2026-04-16 20:41:18 +02:00
We must not pass values to `gdImageScale()` which cannot be represented by an `unsigned int`. Instead we return FALSE, according to what we already did for negative integers.
21 lines
445 B
PHP
21 lines
445 B
PHP
--TEST--
|
|
Bug #73957 (signed integer conversion in imagescale())
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('gd')) die('skip gd extension not available');
|
|
if (PHP_INT_SIZE != 8) die('skip this test is for 64bit platforms only');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$im = imagecreate(8, 8);
|
|
$im = imagescale($im, 0x100000001, 1);
|
|
var_dump($im);
|
|
if ($im) { // which is not supposed to happen
|
|
var_dump(imagesx($im));
|
|
}
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
bool(false)
|
|
===DONE===
|