Commit fb883d86 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

ole32: Fix SetSize for HGLOBAL streams in the case of being out-of-memory.

parent fda64982
...@@ -426,7 +426,7 @@ static HRESULT WINAPI HGLOBALStreamImpl_SetSize( ...@@ -426,7 +426,7 @@ static HRESULT WINAPI HGLOBALStreamImpl_SetSize(
supportHandle = GlobalReAlloc(This->supportHandle, libNewSize.u.LowPart, 0); supportHandle = GlobalReAlloc(This->supportHandle, libNewSize.u.LowPart, 0);
if (supportHandle == 0) if (supportHandle == 0)
return STG_E_MEDIUMFULL; return E_OUTOFMEMORY;
This->supportHandle = supportHandle; This->supportHandle = supportHandle;
This->streamSize.u.LowPart = libNewSize.u.LowPart; This->streamSize.u.LowPart = libNewSize.u.LowPart;
......
...@@ -79,9 +79,7 @@ static void test_streamonhglobal(IStream *pStream) ...@@ -79,9 +79,7 @@ static void test_streamonhglobal(IStream *pStream)
ull.u.HighPart = -1; ull.u.HighPart = -1;
ull.u.LowPart = -1; ull.u.LowPart = -1;
hr = IStream_SetSize(pStream, ull); hr = IStream_SetSize(pStream, ull);
todo_wine {
ok(hr == E_OUTOFMEMORY, "IStream_SetSize with large size should have returned E_OUTOFMEMORY instead of 0x%08x\n", hr); ok(hr == E_OUTOFMEMORY, "IStream_SetSize with large size should have returned E_OUTOFMEMORY instead of 0x%08x\n", hr);
}
} }
START_TEST(hglobalstream) START_TEST(hglobalstream)
......
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