xref: /PHP-7.4/ext/phar/tests/bug77396.phpt (revision 46561dab)
1--TEST--
2Bug #77396 Relative filename exceeding maximum path length causes null pointer dereference.
3--SKIPIF--
4<?php if (!extension_loaded("phar")) die("skip"); ?>
5--FILE--
6<?php
7$path = '../' . str_repeat("x", PHP_MAXPATHLEN) . '.tar';
8try {
9    $phar = new PharData($path);
10} catch (UnexpectedValueException $e) {
11    echo $e->getMessage(), "\n";
12}
13?>
14--EXPECT--
15Phar creation or opening failed
16