Commit 126c0abe authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msxml3: Add error handling when reading from IStream.

parent 655155fe
......@@ -1876,8 +1876,20 @@ static HRESULT WINAPI internal_parse(
if(hr == E_PENDING) continue;
break;
}
if(hr != S_OK)
{
IStream_Release(stream);
break;
}
data = HeapAlloc(GetProcessHeap(), 0,
dataInfo.cbSize.QuadPart);
if(!data)
{
IStream_Release(stream);
break;
}
while(1)
{
hr = IStream_Read(stream, data,
......@@ -1885,6 +1897,13 @@ static HRESULT WINAPI internal_parse(
if(hr == E_PENDING) continue;
break;
}
if(hr != S_OK)
{
HeapFree(GetProcessHeap(), 0, data);
IStream_Release(stream);
break;
}
hr = internal_parseBuffer(This, data,
dataInfo.cbSize.QuadPart, vbInterface);
HeapFree(GetProcessHeap(), 0, data);
......
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