mirror of
https://github.com/php/php-src.git
synced 2026-04-21 15:08:16 +02:00
87829c09a1
Very large WBMP (width or height greater than 2**31-1) cause an overflow and circumvent the size limitation of 2048x2048 px. Very small WBMP (less than 12 bytes) cause a read error and are not recognized. This patch fixes both bugs.
22 lines
383 B
PHP
22 lines
383 B
PHP
--TEST--
|
|
Bug #70052 (getimagesize() fails for very large and very small WBMP)
|
|
--FILE--
|
|
<?php
|
|
var_dump(getimagesize(__DIR__ . '/bug70052_1.wbmp'));
|
|
var_dump(getimagesize(__DIR__ . '/bug70052_2.wbmp'));
|
|
?>
|
|
--EXPECT--
|
|
bool(false)
|
|
array(5) {
|
|
[0]=>
|
|
int(3)
|
|
[1]=>
|
|
int(3)
|
|
[2]=>
|
|
int(15)
|
|
[3]=>
|
|
string(20) "width="3" height="3""
|
|
["mime"]=>
|
|
string(18) "image/vnd.wap.wbmp"
|
|
}
|