mirror of
https://github.com/php/php-src.git
synced 2026-04-27 18:23:26 +02:00
edae24313d
In phar_renmae_archive() context, added one reference but immediately destroyed another, so do not need to increase refcount. With removal of refcount++ line, PHP/Zend no longer reports memory leak. Updated bug69958.phpt test file accordingly. Closes GH-10856
16 lines
468 B
PHP
16 lines
468 B
PHP
--TEST--
|
|
Phar: bug #69958: Segfault in Phar::convertToData on invalid file
|
|
--EXTENSIONS--
|
|
phar
|
|
--FILE--
|
|
<?php
|
|
$tarphar = new PharData(__DIR__.'/bug69958.tar');
|
|
$phar = $tarphar->convertToData(Phar::TAR);
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught BadMethodCallException: phar "%sbug69958.tar" exists and must be unlinked prior to conversion in %sbug69958.php:%d
|
|
Stack trace:
|
|
#0 %sbug69958.php(%d): PharData->convertToData(%d)
|
|
#1 {main}
|
|
thrown in %sbug69958.php on line %d
|