mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
8d6e958867
Due to a signedness confusion in `GetCode_` a corrupt GIF file can trigger an infinite loop. Furthermore we make sure that a GIF without any palette entries is treated as invalid *after* open palette entries have been removed.
16 lines
350 B
PHP
16 lines
350 B
PHP
--TEST--
|
|
Bug #75571 (Infinite loop in GIF reading causing DoS)
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('gd')) die('skip gd extension not available');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
var_dump(imagecreatefromgif(__DIR__ . '/bug75571.gif'));
|
|
?>
|
|
===DONE===
|
|
--EXPECTF--
|
|
Warning: imagecreatefromgif(): '%s' is not a valid GIF file in %s on line %d
|
|
bool(false)
|
|
===DONE===
|