qmgr: Fix WINHTTP_OPTION_CONTEXT_VALUE data pointer (Coverity)

Nikolay Sivov nsivov at codeweavers.com
Sat Jun 27 02:57:08 CDT 2015


Hans, does it look right?
-------------- next part --------------
From 7ad7ff49b96a44c7cb5ace651dd2980e104b3eaa Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sat, 27 Jun 2015 10:50:01 +0300
Subject: [PATCH] qmgr: Fix WINHTTP_OPTION_CONTEXT_VALUE data pointer
 (Coverity)

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

diff --git a/dlls/qmgr/file.c b/dlls/qmgr/file.c
index c132c7e..4dccbfd 100644
--- a/dlls/qmgr/file.c
+++ b/dlls/qmgr/file.c
@@ -378,7 +378,7 @@ static BOOL transfer_file_http(BackgroundCopyFileImpl *file, URL_COMPONENTSW *uc
 
     if (!(ses = WinHttpOpen(NULL, 0, NULL, NULL, WINHTTP_FLAG_ASYNC))) return FALSE;
     WinHttpSetStatusCallback(ses, progress_callback_http, WINHTTP_CALLBACK_FLAG_ALL_COMPLETIONS, 0);
-    if (!WinHttpSetOption(ses, WINHTTP_OPTION_CONTEXT_VALUE, file, sizeof(file))) goto done;
+    if (!WinHttpSetOption(ses, WINHTTP_OPTION_CONTEXT_VALUE, &file, sizeof(file))) goto done;
 
     if (!(con = WinHttpConnect(ses, uc->lpszHostName, uc->nPort, 0))) goto done;
     if (!(req = WinHttpOpenRequest(con, NULL, uc->lpszUrlPath, NULL, NULL, NULL, flags))) goto done;
-- 
2.1.4



More information about the wine-patches mailing list