Commit 5ce2d25b authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

ole32: Reset the parent storage on overwritten streams so that operations on them now fail.

parent 842d1b69
......@@ -1015,6 +1015,17 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream(
*/
if (STGM_CREATE_MODE(grfMode) == STGM_CREATE)
{
StgStreamImpl *strm;
LIST_FOR_EACH_ENTRY(strm, &This->strmHead, StgStreamImpl, StrmListEntry)
{
if (strm->ownerProperty == foundPropertyIndex)
{
TRACE("Stream deleted %p\n", strm);
strm->parentStorage = NULL;
list_remove(&strm->StrmListEntry);
}
}
IStorage_DestroyElement(iface, pwcsName);
}
else
......
......@@ -335,7 +335,6 @@ static void test_storage_stream(void)
ok(r==S_OK, "IStorage->CreateStream failed\n");
r = IStream_Seek(stm, pos, STREAM_SEEK_SET, &p);
todo_wine
ok(r==STG_E_REVERTED, "overwritten stream should return STG_E_REVERTED instead of 0x%08x\n", r);
r = IStream_Release(stm2);
......
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