1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Files
archived-php-src/ext/phar/tests/bug79503.phpt
Christoph M. Becker ccca2c448d Fix #79503: Memory leak on duplicate metadata
Duplicate metadata can only happen if someone tampers with the phar, so
we can and should treat that as error.
2020-04-22 15:07:46 +02:00

17 lines
402 B
PHP

--TEST--
Bug #79503 (Memory leak on duplicate metadata)
--SKIPIF--
<?php
if (!extension_loaded('phar')) die('skip phar extension not available');
?>
--FILE--
<?php
try {
new Phar(__DIR__ . '/bug79503.phar');
} catch (UnexpectedValueException $ex) {
echo $ex->getMessage();
}
?>
--EXPECTF--
phar error: tar-based phar "%s%ebug79503.phar" has invalid metadata in magic file ".phar/.metadata.bin"