msi: Check number of bytes returned by ReadFile.
This commit is contained in:
parent
724eda257f
commit
a5b51a766b
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user