mirror of
https://github.com/php/php-src.git
synced 2026-04-16 20:41:18 +02:00
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.
16 lines
326 B
PHP
16 lines
326 B
PHP
--TEST--
|
|
Bug #73968 (Premature failing of XBM reading)
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('gd')) die('skip gd extension not available');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$im = imagecreatefromxbm(__DIR__ . DIRECTORY_SEPARATOR . 'bug73968.xbm');
|
|
var_dump($im);
|
|
?>
|
|
===DONE===
|
|
--EXPECTF--
|
|
resource(%d) of type (gd)
|
|
===DONE===
|