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
cute-signatures
Timo Teräs 2020-04-01 11:08:43 +03:00
parent 845b6397ab
commit d6c54f9320
1 changed files with 1 additions and 1 deletions

View File

@ -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 */