From 404c8850da5a677638959f4e38bb7692cb887d3a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 18 May 2018 16:48:13 +0200 Subject: curl_fnmatch: only allow two asterisks for matching The previous limit of 5 can still end up in situation that takes a very long time and consumes a lot of CPU. If there is still a rare use case for this, a user can provide their own fnmatch callback for a version that allows a larger set of wildcards. This commit was triggered by yet another OSS-Fuzz timeout due to this. Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8369 Closes #2587 --- tests/unit/unit1307.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'tests/unit') diff --git a/tests/unit/unit1307.c b/tests/unit/unit1307.c index 0d2257bf0..5f60332b8 100644 --- a/tests/unit/unit1307.c +++ b/tests/unit/unit1307.c @@ -185,11 +185,7 @@ static const struct testcase tests[] = { { "\\?.txt", "x.txt", NOMATCH }, { "\\*.txt", "x.txt", NOMATCH }, { "\\*\\\\.txt", "*\\.txt", MATCH }, - { "*\\**\\?*\\\\*", "cc*cc?cc\\cc*cc", MATCH }, { "*\\**\\?*\\\\*", "cc*cc?cccc", NOMATCH }, - { "*\\**\\?*\\\\*", "cc*cc?cc\\cc*cc", MATCH }, - { "*\\?*\\**", "cc?c*c", MATCH }, - { "*\\?*\\**curl*", "cc?c*curl", MATCH }, { "*\\?*\\**", "cc?cc", NOMATCH }, { "\\\"\\$\\&\\'\\(\\)", "\"$&'()", MATCH }, { "\\*\\?\\[\\\\\\`\\|", "*?[\\`|", MATCH }, -- cgit v1.2.3