Dmitry Timoshkov : msi: Check number of bytes returned by ReadFile.
Alexandre Julliard
julliard at winehq.org
Wed Oct 30 13:11:04 CDT 2013
Module: wine
Branch: master
Commit: a5b51a766b2d618efde50ef8924d2206777da8a6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a5b51a766b2d618efde50ef8924d2206777da8a6
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Tue Oct 29 16:09:13 2013 +0900
msi: Check number of bytes returned by ReadFile.
---
dlls/msi/record.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/record.c b/dlls/msi/record.c
index a44f42d..3c1cf00 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);
More information about the wine-cvs
mailing list