From 65232d874d3b476485a4d9fe70974a21a0d52f30 Mon Sep 17 00:00:00 2001 From: Daniel Lehman Date: Wed, 30 Aug 2017 09:44:16 -0700 Subject: [PATCH] wininet: Fix proxy bypass with wildcard if domain length matches with server if no_proxy is *.winehq.org and server is www.winehq.org, the proxy is not bypassed at this point in HTTP_DomainMatches: if (len <= domain.len - 2) return FALSE; len = 10 (winehq.org from www.winehq.org) and domain.len is 12 (*.winehq.org) the condition is true and HTTP_DomainMatches returns FALSE it doesn't reach this condition at the bottom of the function, where it checks for equality: return len == domain.len-2 && !strncmpiW(dot + 1, domain.str + 2, len); Signed-off-by: Daniel Lehman --- dlls/wininet/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index dc106d8..9191188 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -1732,7 +1732,7 @@ static BOOL HTTP_DomainMatches(LPCWSTR server, substr_t domain) return FALSE; len = strlenW(dot + 1); - if(len <= domain.len - 2) + if(len < domain.len - 2) return FALSE; /* The server's domain is longer than the wildcard, so it -- 1.9.5