From 63d757f04473df8b532dad9c913f7997d26a060a Mon Sep 17 00:00:00 2001 From: Ulrich Czekalla Date: Mon, 6 Dec 2004 16:18:22 +0000 Subject: [PATCH] Set the out buffer count to zero on read error. --- dlls/msi/record.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/msi/record.c b/dlls/msi/record.c index 84a363e21dc..a9a32adcee5 100644 --- a/dlls/msi/record.c +++ b/dlls/msi/record.c @@ -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;