Commit b3511ebb authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

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.
parent fc50ff07
...@@ -2475,7 +2475,8 @@ static HRESULT StorageImpl_StreamWriteAt(StorageBaseImpl *base, DirRef index, ...@@ -2475,7 +2475,8 @@ static HRESULT StorageImpl_StreamWriteAt(StorageBaseImpl *base, DirRef index,
if (FAILED(hr)) if (FAILED(hr))
return 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) if (data.size.QuadPart < LIMIT_TO_USE_SMALL_BLOCK)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment