mirror of
https://github.com/php/php-src.git
synced 2026-04-26 09:28:21 +02:00
f67d599a01
We must take into account the line padding, when we're reading XBM files. We deliberately ignore the potential integer overflow here, because that would be caught by gdImageCreate() or even earlier if `bytes==0`, what happens in libgd00094.phpt which we adapt accordingly.
17 lines
454 B
PHP
17 lines
454 B
PHP
--TEST--
|
|
libgd #94 (imagecreatefromxbm can crash if gdImageCreate fails)
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('gd')) die("skip gd extension not available\n");
|
|
if (!GD_BUNDLED) die("skip requires bundled GD library\n");
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$im = imagecreatefromxbm(dirname(__FILE__) . '/libgd00094.xbm');
|
|
var_dump($im);
|
|
?>
|
|
--EXPECTF--
|
|
Warning: imagecreatefromxbm(): '%slibgd00094.xbm' is not a valid XBM file in %slibgd00094.php on line %d
|
|
bool(false)
|
|
|