diff options
author | dartraiden <wowemuh@gmail.com> | 2021-05-26 22:25:25 +0300 |
---|---|---|
committer | dartraiden <wowemuh@gmail.com> | 2021-05-26 22:26:43 +0300 |
commit | 43f100ad4b599dbc564f9920e63afdc242f0a27c (patch) | |
tree | fc63fd04b0dbb0a3b1e59a10a1f9e2217388aeb4 /libs/libcurl/src/hostcheck.c | |
parent | 7d4ed0164a32a3667fb3786fb538fc083153883a (diff) |
libcurl: update to 7.77
Diffstat (limited to 'libs/libcurl/src/hostcheck.c')
-rw-r--r-- | libs/libcurl/src/hostcheck.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/libcurl/src/hostcheck.c b/libs/libcurl/src/hostcheck.c index 0fef98b2ad..49dbab3472 100644 --- a/libs/libcurl/src/hostcheck.c +++ b/libs/libcurl/src/hostcheck.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2021, 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 @@ -81,7 +81,7 @@ static int hostmatch(char *hostname, char *pattern) pattern[len-1] = 0; pattern_wildcard = strchr(pattern, '*'); - if(pattern_wildcard == NULL) + if(!pattern_wildcard) return strcasecompare(pattern, hostname) ? CURL_HOST_MATCH : CURL_HOST_NOMATCH; @@ -97,7 +97,7 @@ static int hostmatch(char *hostname, char *pattern) match. */ wildcard_enabled = 1; pattern_label_end = strchr(pattern, '.'); - if(pattern_label_end == NULL || strchr(pattern_label_end + 1, '.') == NULL || + if(!pattern_label_end || strchr(pattern_label_end + 1, '.') == NULL || pattern_wildcard > pattern_label_end || strncasecompare(pattern, "xn--", 4)) { wildcard_enabled = 0; @@ -107,7 +107,7 @@ static int hostmatch(char *hostname, char *pattern) CURL_HOST_MATCH : CURL_HOST_NOMATCH; hostname_label_end = strchr(hostname, '.'); - if(hostname_label_end == NULL || + if(!hostname_label_end || !strcasecompare(pattern_label_end, hostname_label_end)) return CURL_HOST_NOMATCH; |