From: Aric Stewart Subject: ole32: Do not fail if partial blocks are read Message-Id: <51BF393A.3030606@codeweavers.com> Date: Mon, 17 Jun 2013 11:28:42 -0500 fixes bug 25346 --- dlls/ole32/storage32.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 5009127..bd076ce 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -6226,7 +6226,8 @@ HRESULT BlockChainStream_ReadAt(BlockChainStream* This, { if (!cachedBlock->read) { - if (FAILED(StorageImpl_ReadBigBlock(This->parentStorage, cachedBlock->sector, cachedBlock->data, NULL))) + ULONG read; + if (FAILED(StorageImpl_ReadBigBlock(This->parentStorage, cachedBlock->sector, cachedBlock->data, &read)) && !read) return STG_E_READFAULT; cachedBlock->read = 1; @@ -6310,7 +6311,8 @@ HRESULT BlockChainStream_WriteAt(BlockChainStream* This, { if (!cachedBlock->read && bytesToWrite != This->parentStorage->bigBlockSize) { - if (FAILED(StorageImpl_ReadBigBlock(This->parentStorage, cachedBlock->sector, cachedBlock->data, NULL))) + ULONG read; + if (FAILED(StorageImpl_ReadBigBlock(This->parentStorage, cachedBlock->sector, cachedBlock->data, &read)) && !read) return STG_E_READFAULT; }