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