mirror of
https://github.com/php/php-src.git
synced 2025-01-21 11:13:38 +08:00
fe820fcba6
* PHP-7.1: Fix #77369 - memcpy with negative length via crafted DNS response Fix more issues with encodilng length Fix #77270: imagecolormatch Out Of Bounds Write on Heap Fix bug #77380 (Global out of bounds read in xmlrpc base64 code) Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) Fix bug #77370 - check that we do not read past buffer end when parsing multibytes Fix #77269: Potential unsigned underflow in gdImageScale Fix bug #77247 (heap buffer overflow in phar_detect_phar_fname_ext) Fix bug #77242 (heap out of bounds read in xmlrpc_decode()) Regenerate certs for openssl tests
22 lines
516 B
PHP
22 lines
516 B
PHP
--TEST--
|
|
Bug #77269 (Potential unsigned underflow in gdImageScale)
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('gd')) die('skip gd extension not available');
|
|
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
|
|
?>
|
|
--INI--
|
|
memory_limit=2G
|
|
--FILE--
|
|
<?php
|
|
$im = imagecreate(2**28, 1);
|
|
if(is_resource($im)) {
|
|
imagescale($im, 1, 1, IMG_TRIANGLE);
|
|
}
|
|
?>
|
|
===DONE===
|
|
--EXPECTF--
|
|
Warning: imagescale():%S product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully
|
|
in %s on line %d
|
|
===DONE===
|