[PATCH] user32: Don't overwrite 'cb' field with uninitialized data in DdeQueryConvInfo() (Coverity)

Nikolay Sivov nsivov at codeweavers.com
Mon Nov 23 08:31:21 CST 2015


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/user32/dde_misc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/user32/dde_misc.c b/dlls/user32/dde_misc.c
index d66d2e0..175d9e3 100644
--- a/dlls/user32/dde_misc.c
+++ b/dlls/user32/dde_misc.c
@@ -2468,7 +2468,10 @@ UINT WINAPI DdeQueryConvInfo(HCONV hConv, DWORD id, PCONVINFO lpConvInfo)
     }
 
     if (ret != 0)
+    {
+	ci.cb = lpConvInfo->cb;
 	memcpy(lpConvInfo, &ci, min((size_t)lpConvInfo->cb, sizeof(ci)));
+    }
     return ret;
 }
 
-- 
2.6.2




More information about the wine-patches mailing list