Browse Source

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.10
Michael Niedermayer 13 years ago
parent
commit
14d94a1952
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      libavformat/avidec.c

+ 1
- 2
libavformat/avidec.c View File

@@ -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…
Cancel
Save