Zhiyi Zhang : winhttp: Initialize a return variable.

Alexandre Julliard julliard at winehq.org
Tue Dec 24 13:45:08 CST 2019


Module: wine
Branch: master
Commit: 80a8c8d259411c8649b4bb60367041aa0d5d75b5
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=80a8c8d259411c8649b4bb60367041aa0d5d75b5

Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date:   Tue Dec 24 17:18:07 2019 +0800

winhttp: Initialize a return variable.

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>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 )))




More information about the wine-cvs mailing list