xref: /PHP-7.4/ext/phar/tests/bug69441.phpt (revision d1b1c043)
1--TEST--
2Phar: bug #69441: Buffer Overflow when parsing tar/zip/phar in phar_set_inode
3--SKIPIF--
4<?php if (!extension_loaded("phar")) die("skip"); ?>
5--FILE--
6<?php
7$fname = __DIR__ . '/bug69441.phar';
8try {
9$r = new Phar($fname, 0);
10} catch(UnexpectedValueException $e) {
11	echo $e;
12}
13?>
14
15==DONE==
16--EXPECTF--
17UnexpectedValueException: phar error: end of central directory not found in zip-based phar "%sbug69441.phar" in %sbug69441.php:%d
18Stack trace:
19#0 %s%ebug69441.php(%d): Phar->__construct('%s', 0)
20#1 {main}
21==DONE==
22