From a5b51a766b2d618efde50ef8924d2206777da8a6 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Tue, 29 Oct 2013 16:09:13 +0900 Subject: [PATCH] msi: Check number of bytes returned by ReadFile. --- dlls/msi/record.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/msi/record.c b/dlls/msi/record.c index a44f42d1a02..3c1cf0036f6 100644 --- a/dlls/msi/record.c +++ b/dlls/msi/record.c @@ -683,7 +683,7 @@ static UINT RECORD_StreamFromFile(LPCWSTR szFile, IStream **pstm) hGlob = GlobalAlloc(GMEM_FIXED, sz); if( hGlob ) { - BOOL r = ReadFile(handle, hGlob, sz, &read, NULL); + BOOL r = ReadFile(handle, hGlob, sz, &read, NULL) && read == sz; if( !r ) { GlobalFree(hGlob);