source: src/router/php7/ext/gd/tests/bug73549.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 3 months ago

update php

File size: 485 bytes
Line 
1--TEST--
2Bug #73549 (Use after free when stream is passed to imagepng)
3--SKIPIF--
4<?php
5if (!extension_loaded('gd')) die('skip gd extension not available');
6?>
7--FILE--
8<?php
9$stream = fopen(__DIR__ . DIRECTORY_SEPARATOR . 'bug73549.png', 'w');
10$im = imagecreatetruecolor(8, 8);
11var_dump(imagepng($im, $stream));
12var_dump($stream);
13?>
14===DONE===
15--EXPECTF--
16bool(true)
17resource(%d) of type (stream)
18===DONE===
19--CLEAN--
20<?php
21unlink(__DIR__ . DIRECTORY_SEPARATOR . 'bug73549.png');
22?>
Note: See TracBrowser for help on using the repository browser.