msi: Check number of bytes returned by ReadFile.

Dmitry Timoshkov dmitry at baikal.ru
Tue Oct 29 02:09:13 CDT 2013


---
 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 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);
-- 
1.8.4.1




More information about the wine-patches mailing list