X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Favidec.c;h=f119a1ab45b51fcf642de3ddafbc487631c37d46;hb=f863cdef813e51d5850e2386618feafe197f06f4;hp=569d59216e9c9e1e1beedec0e74035c4e03e6ebe;hpb=d912e449b655797407a75527380c566955b71a8e;p=ffmpeg diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 569d59216e9..f119a1ab45b 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -690,9 +690,9 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) break; case MKTAG('i', 'n', 'd', 'x'): i= avio_tell(pb); - if(pb->seekable && !(s->flags & AVFMT_FLAG_IGNIDX) && avi->use_odml){ - read_braindead_odml_indx(s, 0); - } + if(pb->seekable && !(s->flags & AVFMT_FLAG_IGNIDX) && avi->use_odml && + read_braindead_odml_indx(s, 0) < 0 && s->error_recognition >= FF_ER_EXPLODE){ + goto fail; } avio_seek(pb, i+size, SEEK_SET); break; case MKTAG('v', 'p', 'r', 'p'): @@ -729,6 +729,7 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap) if(size > 1000000){ av_log(s, AV_LOG_ERROR, "Something went wrong during header parsing, " "I will ignore it and try to continue anyway.\n"); + if (s->error_recognition >= FF_ER_EXPLODE) goto fail; avi->movi_list = avio_tell(pb) - 4; avi->movi_end = avio_size(pb); goto end_of_header;