[PATCH] ole32: read vt into a DWORD, as propvariant->vt is 16 bit (Coverity)
713110 Out-of-bounds access Signed-off-by: Marcus Meissner <marcus(a)jet.franken.de> --- 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 0213f31a8d..221463bc05 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: -- 2.18.0
participants (1)
-
Marcus Meissner