mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-05 23:38:27 +00:00
mfreadwrite/reader: Avoid accessing an invalid stream index.
Fixes d6c9ac94d2
.
This commit is contained in:
parent
5cd5e7b8c6
commit
e3510c6bdb
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue