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.
This commit is contained in:
parent
8f604e925d
commit
dfa74b998e
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue