]> git.ipfire.org Git - thirdparty/curl.git/commit
curl_fnmatch: only allow two asterisks for matching
authorDaniel Stenberg <daniel@haxx.se>
Fri, 18 May 2018 14:48:13 +0000 (16:48 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 18 May 2018 21:33:44 +0000 (23:33 +0200)
commit404c8850da5a677638959f4e38bb7692cb887d3a
tree0cc2d3399ba189df38e83536b42a1f837da27aec
parent27aebcc1d1a0825af6e812f86bf5eaf510f610d1
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
docs/libcurl/opts/CURLOPT_WILDCARDMATCH.3
lib/curl_fnmatch.c
tests/unit/unit1307.c