aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/libcurl/opts/CURLOPT_WILDCARDMATCH.34
-rw-r--r--lib/curl_fnmatch.c2
-rw-r--r--tests/unit/unit1307.c4
3 files changed, 3 insertions, 7 deletions
diff --git a/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3 b/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3
index 1ca1bedd4..da1fea9fb 100644
--- a/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3
+++ b/docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3
@@ -5,7 +5,7 @@
.\" * | (__| |_| | _ <| |___
.\" * \___|\___/|_| \_\_____|
.\" *
-.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -41,7 +41,7 @@ A brief introduction of its syntax follows:
.RS
.IP "* - ASTERISK"
\&ftp://example.com/some/path/\fB*.txt\fP (for all txt's from the root
-directory)
+directory). Only two asterisks are allowed within the same pattern string.
.RE
.RS
.IP "? - QUESTION MARK"
diff --git a/lib/curl_fnmatch.c b/lib/curl_fnmatch.c
index 0179a4f71..268fe79b3 100644
--- a/lib/curl_fnmatch.c
+++ b/lib/curl_fnmatch.c
@@ -355,5 +355,5 @@ int Curl_fnmatch(void *ptr, const char *pattern, const char *string)
if(!pattern || !string) {
return CURL_FNMATCH_FAIL;
}
- return loop((unsigned char *)pattern, (unsigned char *)string, 5);
+ return loop((unsigned char *)pattern, (unsigned char *)string, 2);
}
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 },