xref: /PHP-5.5/ext/phar/tests/bug69453.phpt (revision c27f012b)
1--TEST--
2Phar: bug #69453: Memory Corruption in phar_parse_tarfile when entry filename starts with null
3--SKIPIF--
4<?php if (!extension_loaded("phar")) die("skip"); ?>
5--FILE--
6<?php
7$fname = dirname(__FILE__) . '/bug69453.tar.phar';
8try {
9$r = new Phar($fname, 0);
10} catch(UnexpectedValueException $e) {
11	echo $e;
12}
13?>
14
15==DONE==
16--EXPECTF--
17exception 'UnexpectedValueException' with message 'phar error: "%s/bug69453.tar.phar" is a corrupted tar file (checksum mismatch of file "")' in %s:%d
18Stack trace:
19#0 %s/bug69453.php(%d): Phar->__construct('%s', 0)
20#1 {main}
21==DONE==