Set the out buffer count to zero on read error.

This commit is contained in:
Ulrich Czekalla 2004-12-06 16:18:22 +00:00 committed by Alexandre Julliard
parent 6b395bab07
commit 63d757f044
1 changed files with 3 additions and 0 deletions

View File

@ -534,7 +534,10 @@ UINT MSI_RecordReadStream(MSIRECORD *rec, unsigned int iField, char *buf, DWORD
count = 0;
r = IStream_Read( stm, buf, *sz, &count );
if( FAILED( r ) )
{
*sz = 0;
return ERROR_FUNCTION_FAILED;
}
*sz = count;