Commit a5b51a76 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

msi: Check number of bytes returned by ReadFile.

parent 724eda25
...@@ -683,7 +683,7 @@ static UINT RECORD_StreamFromFile(LPCWSTR szFile, IStream **pstm) ...@@ -683,7 +683,7 @@ static UINT RECORD_StreamFromFile(LPCWSTR szFile, IStream **pstm)
hGlob = GlobalAlloc(GMEM_FIXED, sz); hGlob = GlobalAlloc(GMEM_FIXED, sz);
if( hGlob ) if( hGlob )
{ {
BOOL r = ReadFile(handle, hGlob, sz, &read, NULL); BOOL r = ReadFile(handle, hGlob, sz, &read, NULL) && read == sz;
if( !r ) if( !r )
{ {
GlobalFree(hGlob); GlobalFree(hGlob);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment