We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3eaab04 commit cb73872Copy full SHA for cb73872
ext/phar/tests/bug66960.phpt
@@ -0,0 +1,24 @@
1
+--TEST--
2
+Bug #66960 phar long filename crash
3
+--SKIPIF--
4
+<?php if (!extension_loaded("phar")) die("skip"); ?>
5
+--INI--
6
+phar.readonly = 0
7
+memory_limit = -1
8
+--FILE--
9
+<?php
10
+$file = __DIR__ . DIRECTORY_SEPARATOR . 'bug66960.phar';
11
+$phar = new Phar($file);
12
+var_dump(file_exists("phar://$file/". str_repeat('a', PHP_MAXPATHLEN-1)));
13
+var_dump(file_exists("phar://$file/". str_repeat('a', PHP_MAXPATHLEN)));
14
+var_dump(file_exists("phar://$file/". str_repeat('a', PHP_MAXPATHLEN+1)));
15
+echo 'done';
16
+?>
17
+--CLEAN--
18
19
+unlink($file);
20
+--EXPECT--
21
+bool(false)
22
23
24
+done
0 commit comments