From 1565b5f0fdd3ba744809be62a9d7ded9b88635aa Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Sat, 19 Dec 2009 14:20:02 -0600 Subject: [PATCH] ole32: Reread the stream entry after setting the size in StreamWriteAt. In simple mode, StreamWriteAt would assume that StreamSetSize uses the size it asks for, but in some cases the size would be pushed above the small block limit. StreamWriteAt would then attempt to write using a small block chain, even though a big block chain was created. --- dlls/ole32/storage32.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 7d267b6..dc315a6 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -2486,7 +2486,8 @@ static HRESULT StorageImpl_StreamWriteAt(StorageBaseImpl *base, DirRef index, if (FAILED(hr)) return hr; - data.size = newSize; + hr = StorageImpl_ReadDirEntry(This, index, &data); + if (FAILED(hr)) return hr; } if (data.size.QuadPart < LIMIT_TO_USE_SMALL_BLOCK) -- 1.6.3.3