Marcus Meissner : ole32: Read vt into a DWORD, as propvariant-> vt is 16 bit (Coverity).

Alexandre Julliard julliard at winehq.org
Thu Nov 29 15:09:40 CST 2018


Module: wine
Branch: stable
Commit: 2820b3370ca4b57ce02d0f94552c035beb9a321d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2820b3370ca4b57ce02d0f94552c035beb9a321d

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Sat Jul 21 13:50:11 2018 +0200

ole32: Read vt into a DWORD, as propvariant->vt is 16 bit (Coverity).

Signed-off-by: Marcus Meissner <marcus at jet.franken.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 71c3bf2bf8e569ac5c172a14eafcffb1d4e7e513)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/ole32/stg_prop.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c
index a259883..15492a3 100644
--- a/dlls/ole32/stg_prop.c
+++ b/dlls/ole32/stg_prop.c
@@ -1045,11 +1045,13 @@ static HRESULT PropertyStorage_ReadProperty(PROPVARIANT *prop, const BYTE *data,
     UINT codepage, void* (WINAPI *allocate)(void *this, ULONG size), void *allocate_data)
 {
     HRESULT hr = S_OK;
+    DWORD vt;
 
     assert(prop);
     assert(data);
-    StorageUtl_ReadDWord(data, 0, (DWORD *)&prop->vt);
+    StorageUtl_ReadDWord(data, 0, &vt);
     data += sizeof(DWORD);
+    prop->vt = vt;
     switch (prop->vt)
     {
     case VT_EMPTY:




More information about the wine-cvs mailing list