xref: /PHP-7.1/ext/phar/tests/bug71488.phpt (revision cd1101e8)
1--TEST--
2Phar: bug #71488: Stack overflow when decompressing tar archives
3--SKIPIF--
4<?php if (!extension_loaded("phar")) die("skip"); ?>
5--FILE--
6<?php
7$p = new PharData(__DIR__."/bug71488.tar");
8$newp = $p->decompress("test");
9?>
10
11DONE
12--CLEAN--
13<?php
14@unlink(__DIR__."/bug71488.test");
15?>
16--EXPECTF--
17Fatal error: Uncaught BadMethodCallException: tar-based phar "%s/bug71488.test" cannot be created, link "%s" is too long for format in %sbug71488.php:%d
18Stack trace:
19#0 %s(%d): PharData->decompress('test')
20#1 {main}
21  thrown in %s on line %d
22