]> granicus.if.org Git - php/commitdiff
Update the tests committed in r305098 (as part of the fix for bug #53226) to
authorAdam Harvey <aharvey@php.net>
Mon, 8 Nov 2010 09:14:48 +0000 (09:14 +0000)
committerAdam Harvey <aharvey@php.net>
Mon, 8 Nov 2010 09:14:48 +0000 (09:14 +0000)
use the PHP_MAXPATHLEN constant, as recommended by Pierre.

tests/security/bug53226.phpt

index e462d3e9d7b0acfa4fcde8fac7e7894c0d75dc99..9556e466874710e1501265552acc5ff81ddb8d51 100644 (file)
@@ -10,9 +10,7 @@ create_directories();
 var_dump(file_exists('./test/ok/ok.txt'));
 var_dump(file_exists('./test/foo'));
 
-// Picked an arbitrarily large number that should be beyond PATH_MAX on every
-// OS I know about.
-$file = str_repeat('x', 40000);
+$file = str_repeat('x', 2 * PHP_MAXPATHLEN);
 var_dump(file_exists("./test/$file"));
 ?>
 --CLEAN--