mirror of
https://github.com/php/php-src.git
synced 2026-04-25 17:08:14 +02:00
e7f2356665
The stack overflow is caused by the recursive algorithm in combination with a very large negative coordinate passed to gdImageFillToBorder(). As there is already a clipping for large positive coordinates to the width and height of the image, it seems to be consequent to clip to zero also.
16 lines
322 B
PHP
16 lines
322 B
PHP
--TEST--
|
|
Bug #66387 (Stack overflow with imagefilltoborder)
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('gd')) die('skip gd extension not available!');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$im = imagecreatetruecolor(20, 20);
|
|
$c = imagecolorallocate($im, 255, 0, 0);
|
|
imagefilltoborder($im, 0, -999355, $c, $c);
|
|
echo "ready\n";
|
|
?>
|
|
--EXPECT--
|
|
ready
|