xref: /PHP-7.3/ext/phar/tests/bug66960.phpt (revision cb738727)
1--TEST--
2Bug #66960 phar long filename crash
3--SKIPIF--
4<?php if (!extension_loaded("phar")) die("skip"); ?>
5--INI--
6phar.readonly = 0
7memory_limit = -1
8--FILE--
9<?php
10$file = __DIR__ . DIRECTORY_SEPARATOR . 'bug66960.phar';
11$phar = new Phar($file);
12var_dump(file_exists("phar://$file/". str_repeat('a', PHP_MAXPATHLEN-1)));
13var_dump(file_exists("phar://$file/". str_repeat('a', PHP_MAXPATHLEN)));
14var_dump(file_exists("phar://$file/". str_repeat('a', PHP_MAXPATHLEN+1)));
15echo 'done';
16?>
17--CLEAN--
18$file = __DIR__ . DIRECTORY_SEPARATOR . 'bug66960.phar';
19unlink($file);
20--EXPECT--
21bool(false)
22bool(false)
23bool(false)
24done
25