Commit dfa74b99 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

ole: Check the return value of IStream_SetSize in IStream_Read.

Check the return value of IStream_SetSize in IStream_Read, since otherwise execution could continue on and cause heap corruption.
parent 8f604e92
......@@ -313,7 +313,12 @@ static HRESULT WINAPI HGLOBALStreamImpl_Write(
if (newSize.u.LowPart > This->streamSize.u.LowPart)
{
/* grow stream */
IStream_SetSize(iface, newSize);
HRESULT hr = IStream_SetSize(iface, newSize);
if (FAILED(hr))
{
ERR("IStream_SetSize failed with error 0x%08lx\n", hr);
return hr;
}
}
/*
......
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