avidec: Fix use of stream_index before validation of its range.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
d150a147da
commit
14d94a1952
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user