xref: /PHP-7.3/ext/phar/tests/bug77143.phpt (revision 48f0f73f)
1--TEST--
2PHP bug #77143: Heap Buffer Overflow (READ: 4) in phar_parse_pharfile
3--INI--
4phar.readonly=0
5--SKIPIF--
6<?php if (!extension_loaded("phar")) die("skip"); ?>
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