msi: Check number of bytes returned by ReadFile.

This commit is contained in:
Dmitry Timoshkov 2013-10-29 16:09:13 +09:00 committed by Alexandre Julliard
parent 724eda257f
commit a5b51a766b

View File

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