Hans Leidekker : winhttp: Avoid a crash when the connection is closed while handling a redirect.

Alexandre Julliard julliard at winehq.org
Tue Jan 19 15:44:01 CST 2021


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

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Tue Jan 19 16:52:08 2021 +0100

winhttp: Avoid a crash when the connection is closed while handling a redirect.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48870
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

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

diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
index 31296cd02ba..2ff211255ee 100644
--- a/dlls/winhttp/request.c
+++ b/dlls/winhttp/request.c
@@ -2739,7 +2739,7 @@ static DWORD receive_response( struct request *request, BOOL async )
         break;
     }
 
-    netconn_set_timeout( request->netconn, FALSE, request->receive_timeout );
+    if (request->netconn) netconn_set_timeout( request->netconn, FALSE, request->receive_timeout );
     if (request->content_length) ret = refill_buffer( request, FALSE );
 
     if (async)




More information about the wine-cvs mailing list