diff options
author | Timo Teräs <timo.teras@iki.fi> | 2020-04-01 11:08:43 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2020-04-01 11:08:43 +0300 |
commit | d6c54f932054c58aee8f7a6d2bd49b115d804da1 (patch) | |
tree | 19c4518000aed948f0a4707a5f50d6b2ee521e60 /libfetch | |
parent | 845b6397ab42ef9bca8d9f38cf2b7b2640917a23 (diff) | |
download | apk-tools-d6c54f932054c58aee8f7a6d2bd49b115d804da1.tar.gz apk-tools-d6c54f932054c58aee8f7a6d2bd49b115d804da1.tar.bz2 apk-tools-d6c54f932054c58aee8f7a6d2bd49b115d804da1.tar.xz apk-tools-d6c54f932054c58aee8f7a6d2bd49b115d804da1.zip |
libfetch: fix no_proxy domain name comparision
Fix comparing of the hostname portion that matches exactly.
The no_proxy matching is pretty rudimentary though and probably
could go through a bit of additional rework.
Fixes #10681
Diffstat (limited to 'libfetch')
-rw-r--r-- | libfetch/common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libfetch/common.c b/libfetch/common.c index e237828..9cbe32d 100644 --- a/libfetch/common.c +++ b/libfetch/common.c @@ -1085,7 +1085,7 @@ fetch_no_proxy_match(const char *host) break; d_len = q - p; - if (d_len > 0 && h_len > d_len && + if (d_len > 0 && h_len >= d_len && strncasecmp(host + h_len - d_len, p, d_len) == 0) { /* domain name matches */ |