From b9d8c2b1eacbfd88fd167a6a10bfb02f3885ec10 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Wed, 21 Oct 2015 10:51:52 +0800 Subject: [PATCH] ole32: Initialize number of bytes read before the comparison. Signed-off-by: Dmitry Timoshkov Signed-off-by: Huw Davies Signed-off-by: Alexandre Julliard --- dlls/ole32/datacache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c index 2e2478a2c21..8bb4ed84d24 100644 --- a/dlls/ole32/datacache.c +++ b/dlls/ole32/datacache.c @@ -408,7 +408,7 @@ static HRESULT read_clipformat(IStream *stream, CLIPFORMAT *clipformat) if (length == -1) { DWORD cf; - hr = IStream_Read(stream, &cf, sizeof(cf), 0); + hr = IStream_Read(stream, &cf, sizeof(cf), &read); if (hr != S_OK || read != sizeof(cf)) return DV_E_CLIPFORMAT; *clipformat = cf;