Commit 14d94a19 authored by Michael Niedermayer's avatar Michael Niedermayer

avidec: Fix use of stream_index before validation of its range.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d150a147
......@@ -699,8 +699,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
}
break;
case MKTAG('s', 't', 'r', 'd'):
st = s->streams[stream_index];
if (stream_index >= (unsigned)s->nb_streams || st->codec->extradata_size) {
if (stream_index >= (unsigned)s->nb_streams || s->streams[stream_index]->codec->extradata_size) {
avio_skip(pb, size);
} else {
uint64_t cur_pos = avio_tell(pb);
......
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