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

Alexandre Julliard julliard at winehq.org
Tue Mar 23 15:07:44 CDT 2021


Module: wine
Branch: oldstable
Commit: 36ce75e0e6db46c8dc79f39a97f0f07aba3a6213
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=36ce75e0e6db46c8dc79f39a97f0f07aba3a6213

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>
(cherry picked from commit 83afd177b3735f88e38f926aaf3aa0a20178e458)
Signed-off-by: Michael Stefaniuc <mstefani 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 7c8e6ba89e0..aaa3c0df240 100644
--- a/dlls/winhttp/request.c
+++ b/dlls/winhttp/request.c
@@ -2759,7 +2759,7 @@ static BOOL 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