com php-src: fnmatch error when pattern or filename too long: ext/standard/tests/file/fnmatch_maxpathlen.phpt

From: Date: Sun, 10 Feb 2019 18:38:46 +0000
Subject: com php-src: fnmatch error when pattern or filename too long: ext/standard/tests/file/fnmatch_maxpathlen.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-104512@lists.php.net to get a copy of this message
Commit: 76703ae5a1c7d5532ca2bed9ebb18976f07cbe9d Author: Pete Albrecht <palbrecht@i3logix.com> Tue, 3 Oct 2017 15:39:22 -0600 Committer: Peter Kokot <peterkokot@gmail.com> Sun, 10 Feb 2019 19:38:46 +0100 Parents: 5ca12f6c5ff3b86c09b733566ba3e2a5c7cc4fce Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=76703ae5a1c7d5532ca2bed9ebb18976f07cbe9d Log: fnmatch error when pattern or filename too long i3logix PHP Testfest 2017 Changed paths: A ext/standard/tests/file/fnmatch_maxpathlen.phpt Diff: diff --git a/ext/standard/tests/file/fnmatch_maxpathlen.phpt b/ext/standard/tests/file/fnmatch_maxpathlen.phpt new file mode 100644 index 0000000..849e771 --- /dev/null +++ b/ext/standard/tests/file/fnmatch_maxpathlen.phpt @@ -0,0 +1,18 @@ +--TEST-- +Test fnmatch() function : warning filename or pattern exceeds maxpathlen +--SKIPIF-- +<?php +if (!function_exists('fnmatch')) die('skip fnmatch() function is not available'); +?> +--FILE-- +<?php +$longstring = str_pad('blah', PHP_MAXPATHLEN); +var_dump(fnmatch('blah', $longstring)); +var_dump(fnmatch($longstring, 'blah')); +?> +--EXPECTF-- +Warning: fnmatch(): Filename exceeds the maximum allowed length of %d characters in %s on line %d +bool(false) + +Warning: fnmatch(): Pattern exceeds the maximum allowed length of %d characters in %s on line %d +bool(false)

« previous php.cvs (#104512) next »