[Wine-devel] wininet: fix crash

Alexander Morozov =?iso-8859-1?q?amorozov_=CE=C1_etersoft=2Eru?=
Ср Июн 25 19:40:51 MSD 2008


----------- следующая часть -----------
From 6ab5655ebe26611387c2586b06fad78c16de7239 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на builder.office.etersoft.ru>
Date: Wed, 25 Jun 2008 19:05:40 +0400
Subject: [PATCH] wininet: fix crash

---
 dlls/wininet/dialogs.c       |    3 +++
 dlls/wininet/tests/dialogs.c |    3 +--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/wininet/dialogs.c b/dlls/wininet/dialogs.c
index dd5aa31..cf6ee5c 100644
--- a/dlls/wininet/dialogs.c
+++ b/dlls/wininet/dialogs.c
@@ -75,6 +75,9 @@ static BOOL WININET_GetProxyServer( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
     if (NULL == hIC)
 	return FALSE;
 
+    if (NULL == hIC->lpszProxy)
+	return FALSE;
+
     lstrcpynW(szBuf, hIC->lpszProxy, sz);
 
     /* FIXME: perhaps it would be better to use InternetCrackUrl here */
diff --git a/dlls/wininet/tests/dialogs.c b/dlls/wininet/tests/dialogs.c
index c2f3878..088ba01 100644
--- a/dlls/wininet/tests/dialogs.c
+++ b/dlls/wininet/tests/dialogs.c
@@ -166,7 +166,6 @@ static void test_InternetErrorDlg(void)
         CloseHandle(hThread);
     }
 
-    /* This crashes
     end_thread = 0;
     hThread = CreateThread(NULL, 0, killer_thread,
             (LPVOID)GetCurrentThreadId(), 0, &id);
@@ -181,7 +180,7 @@ static void test_InternetErrorDlg(void)
         ret = WaitForSingleObject(hThread, 3000);
         ok(ret == WAIT_OBJECT_0, "thread wait failed\n");
         CloseHandle(hThread);
-    } */
+    }
 
     InternetCloseHandle(hr);
     InternetCloseHandle(hc);
-- 
1.5.4.5.GIT



Подробная информация о списке рассылки Wine-devel