[PATCH] winhttp: Initialize a return variable.

Zhiyi Zhang zzhang at codeweavers.com
Tue Dec 24 03:18:07 CST 2019


When getaddrinfo() failed in detect_autoproxyconfig_url_dns(),
an undefined variable is passed to WinHttpDetectAutoProxyConfigUrl(),
causing applications to receive a wrong url.

This is a regression from 4ad4173e3a715d5bd27bedc164718cef9cafe0a4.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48349
Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
---
This fixes Steam not displaying anything.

 dlls/winhttp/session.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c
index 22aa285a44..e647d71faf 100644
--- a/dlls/winhttp/session.c
+++ b/dlls/winhttp/session.c
@@ -1427,7 +1427,7 @@ static WCHAR *build_wpad_url( const char *hostname, const struct addrinfo *ai )
 static WCHAR *detect_autoproxyconfig_url_dns(void)
 {
     char *fqdn, *domain, *p;
-    WCHAR *ret;
+    WCHAR *ret = NULL;
 
     if (!(fqdn = get_computer_name( ComputerNamePhysicalDnsFullyQualified ))) return NULL;
     if (!(domain = get_computer_name( ComputerNamePhysicalDnsDomain )))
-- 
2.24.0



More information about the wine-devel mailing list