Commit e3510c6b authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

mfreadwrite/reader: Avoid accessing an invalid stream index.

Fixes d6c9ac94.
parent 5cd5e7b8
......@@ -2365,7 +2365,6 @@ static HRESULT WINAPI src_reader_GetServiceForStream(IMFSourceReaderEx *iface, D
REFIID riid, void **object)
{
struct source_reader *reader = impl_from_IMFSourceReaderEx(iface);
struct media_stream *stream = &reader->streams[index];
IUnknown *obj = NULL;
HRESULT hr = S_OK;
......@@ -2386,7 +2385,7 @@ static HRESULT WINAPI src_reader_GetServiceForStream(IMFSourceReaderEx *iface, D
if (index >= reader->stream_count)
hr = MF_E_INVALIDSTREAMNUMBER;
else if (!(obj = (IUnknown *)stream->transform_service))
else if (!(obj = (IUnknown *)reader->streams[index].transform_service))
hr = E_NOINTERFACE;
break;
}
......
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