avformat/vividas: Fix infinite loop in header parser

Fixes: Timeout (Infinite -> Finite)
Fixes: 16010/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5638616102993920

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2019-08-10 23:09:46 +02:00
parent e8bb949ade
commit 52b564ef13
1 changed files with 3 additions and 0 deletions

View File

@ -546,6 +546,9 @@ static int viv_read_header(AVFormatContext *s)
break;
block_len = ffio_read_varlen(pb);
if (avio_feof(pb))
return AVERROR_INVALIDDATA;
block_type = avio_r8(pb);
if (block_type == 22) {