From: Piotr Caban <piotr(a)codeweavers.com> --- dlls/ole32/stg_prop.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c index 28a240aa2a3..547d1f82335 100644 --- a/dlls/ole32/stg_prop.c +++ b/dlls/ole32/stg_prop.c @@ -2473,6 +2473,7 @@ end: static HRESULT PropertyStorage_WriteToStream(PropertyStorage_impl *This) { + const ULARGE_INTEGER size = { .QuadPart = 0 }; PROPERTYSECTIONHEADER sectionHdr; HRESULT hr; ULONG count; @@ -2480,6 +2481,10 @@ static HRESULT PropertyStorage_WriteToStream(PropertyStorage_impl *This) DWORD numProps, prop, sectionOffset, dwTemp; PROPVARIANT var; + hr = IStream_SetSize(This->stm, size); + if (FAILED(hr)) + return hr; + PropertyStorage_WriteHeadersToStream(This); /* Count properties. Always at least one property, the code page */ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7453