xref: /PHP-8.1/ext/phar/tests/bug69441.phpt (revision 74859783)
1--TEST--
2Phar: bug #69441: Buffer Overflow when parsing tar/zip/phar in phar_set_inode
3--EXTENSIONS--
4phar
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--EXPECTF--
15UnexpectedValueException: phar error: end of central directory not found in zip-based phar "%sbug69441.phar" in %sbug69441.php:%d
16Stack trace:
17#0 %s%ebug69441.php(%d): Phar->__construct('%s', 0)
18#1 {main}
19