xref: /PHP-8.4/ext/phar/tests/bug77143.phpt (revision 74859783)
1--TEST--
2PHP bug #77143: Heap Buffer Overflow (READ: 4) in phar_parse_pharfile
3--INI--
4phar.readonly=0
5--EXTENSIONS--
6phar
7--FILE--
8<?php
9chdir(__DIR__);
10try {
11var_dump(new Phar('bug77143.phar',0,'project.phar'));
12echo "OK\n";
13} catch(UnexpectedValueException $e) {
14    echo $e->getMessage();
15}
16?>
17--EXPECTF--
18internal corruption of phar "%sbug77143.phar" (truncated manifest header)
19