summaryrefslogtreecommitdiff
path: root/ext/phar/tests/bug77396.phpt
blob: f7a2a2f02617c405c0541e7eb8a8d8a894f94f0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--TEST--
Bug #77396 Relative filename exceeding maximum path length causes null pointer dereference.
--SKIPIF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
--FILE--
<?php
$path = '../' . str_repeat("x", PHP_MAXPATHLEN) . '.tar';
$phar = new PharData($path);
?>
--EXPECTF--
Fatal error: Uncaught UnexpectedValueException: Phar creation or opening failed in %s/bug77396.php:%d
Stack trace:
#0 %s/bug77396.php(%d): PharData->__construct(%s)
#1 {main}
  thrown in %s/bug77396.php on line %d