mirror of
https://github.com/php/php-src.git
synced 2026-04-22 15:38:49 +02:00
a375d54785
Cf. PR #6787. Closes GH-6994.
18 lines
332 B
PHP
18 lines
332 B
PHP
--TEST--
|
|
Bug #73159 (imagegd2(): unrecognized formats may result in corrupted files)
|
|
--EXTENSIONS--
|
|
gd
|
|
--FILE--
|
|
<?php
|
|
$im = imagecreatetruecolor(10, 10);
|
|
|
|
ob_start();
|
|
imagegd2($im, null, 128, 0);
|
|
$buffer = ob_get_clean();
|
|
|
|
$header = unpack('@12/nformat', $buffer);
|
|
printf("format: %d\n", $header['format']);
|
|
?>
|
|
--EXPECT--
|
|
format: 4
|