xref: /PHP-7.1/ext/phar/tests/bug77396.phpt (revision 7f0ab7c2)
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';
8$phar = new PharData($path);
9?>
10--EXPECTF--
11Fatal error: Uncaught UnexpectedValueException: Phar creation or opening failed in %s/bug77396.php:%d
12Stack trace:
13#0 %s/bug77396.php(%d): PharData->__construct(%s)
14#1 {main}
15  thrown in %s/bug77396.php on line %d
16