xref: /PHP-8.1/ext/phar/tests/bug66960.phpt (revision 74859783)
1--TEST--
2Bug #66960 phar long filename crash
3--EXTENSIONS--
4phar
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<?php
19$file = __DIR__ . DIRECTORY_SEPARATOR . 'bug66960.phar';
20unlink($file);
21?>
22--EXPECT--
23bool(false)
24bool(false)
25bool(false)
26done
27