summaryrefslogtreecommitdiff
path: root/ext/phar/tests/bug69453.phpt
blob: 18b4a3949fa1c9c42e2bdcb64620d3abc8c1bce7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--TEST--
Phar: bug #69453: Memory Corruption in phar_parse_tarfile when entry filename starts with null
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE--
<?php
$fname = __DIR__ . '/bug69453.tar.phar';
try {
$r = new Phar($fname, 0);
} catch(UnexpectedValueException $e) {
    echo $e;
}
?>

--EXPECTF--
UnexpectedValueException: phar error: "%s%ebug69453.tar.phar" is a corrupted tar file (checksum mismatch of file "") in %s:%d
Stack trace:
#0 %s%ebug69453.php(%d): Phar->__construct('%s', 0)
#1 {main}