summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2020-04-01 11:08:43 +0300
committerTimo Teräs <timo.teras@iki.fi>2021-04-11 13:58:51 +0300
commitf613f12e55b7f8a3445e686ba4617cd3f6c0f244 (patch)
treebba402d1a98a4bddab4c6a2c871fa4df119c01c5
parent367bff6d338e4df332aebd8c93839a1dbbd5c1a5 (diff)
downloadapk-tools-f613f12e55b7f8a3445e686ba4617cd3f6c0f244.tar.gz
apk-tools-f613f12e55b7f8a3445e686ba4617cd3f6c0f244.tar.bz2
apk-tools-f613f12e55b7f8a3445e686ba4617cd3f6c0f244.tar.xz
apk-tools-f613f12e55b7f8a3445e686ba4617cd3f6c0f244.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 (cherry picked from commit d6c54f932054c58aee8f7a6d2bd49b115d804da1)
-rw-r--r--libfetch/common.c2
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 */