[PATCH 0/1] MR1845: winhttp: Check for NULL lpszAutoConfigUrl in WinHttpGetProxyForUrl().
Fixes a regression introduced by cbfe940a1eaf5e158de3127b1265462bfbfb70af. Might be related to https://bugs.winehq.org/show_bug.cgi?id=54055, I don't yet have the confirmation but this is something probably worth fixing regardless. lpszAutoConfigUrl is used whenever WINHTTP_AUTOPROXY_CONFIG_URL is specified, regardless of WINHTTP_AUTOPROXY_AUTO_DETECT presence. Before cbfe940a1eaf5e158de3127b1265462bfbfb70af NULL lpszAutoConfigUrl went directly to GetAddrInfoW(). Now with the timeout it is relayed to aync name resolution thread and might be crashing in wcsdup(). It doesn't happen all the time as we might not be reaching download_script() at all due to prior WinHttpDetectAutoProxyConfigUrl() legitimate failure. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/1845
From: Paul Gofman <pgofman(a)codeweavers.com> Fixes a regression introduced by cbfe940a1eaf5e158de3127b1265462bfbfb70af. --- dlls/winhttp/session.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c index 65e471f7ee5..6b426bee220 100644 --- a/dlls/winhttp/session.c +++ b/dlls/winhttp/session.c @@ -2094,7 +2094,8 @@ BOOL WINAPI WinHttpGetProxyForUrl( HINTERNET hsession, LPCWSTR url, WINHTTP_AUTO !(options->dwFlags & (WINHTTP_AUTOPROXY_AUTO_DETECT|WINHTTP_AUTOPROXY_CONFIG_URL)) || ((options->dwFlags & WINHTTP_AUTOPROXY_AUTO_DETECT) && !options->dwAutoDetectFlags) || ((options->dwFlags & WINHTTP_AUTOPROXY_AUTO_DETECT) && - (options->dwFlags & WINHTTP_AUTOPROXY_CONFIG_URL))) + (options->dwFlags & WINHTTP_AUTOPROXY_CONFIG_URL)) || + (options->dwFlags & WINHTTP_AUTOPROXY_CONFIG_URL && !options->lpszAutoConfigUrl)) { release_object( &session->hdr ); SetLastError( ERROR_INVALID_PARAMETER ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/1845
This merge request was approved by Hans Leidekker. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/1845
participants (3)
-
Hans Leidekker (@hans) -
Paul Gofman -
Paul Gofman (@gofman)