mirror of
https://github.com/php/php-src.git
synced 2026-04-28 18:53:33 +02:00
a375d54785
Cf. PR #6787. Closes GH-6994.
19 lines
392 B
PHP
19 lines
392 B
PHP
--TEST--
|
|
Bug #73549 (Use after free when stream is passed to imagepng)
|
|
--EXTENSIONS--
|
|
gd
|
|
--FILE--
|
|
<?php
|
|
$stream = fopen(__DIR__ . DIRECTORY_SEPARATOR . 'bug73549.png', 'w');
|
|
$im = imagecreatetruecolor(8, 8);
|
|
var_dump(imagepng($im, $stream));
|
|
var_dump($stream);
|
|
?>
|
|
--EXPECTF--
|
|
bool(true)
|
|
resource(%d) of type (stream)
|
|
--CLEAN--
|
|
<?php
|
|
unlink(__DIR__ . DIRECTORY_SEPARATOR . 'bug73549.png');
|
|
?>
|