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>
pull/321/head^2
Michael Niedermayer 6 years ago
parent e8bb949ade
commit 52b564ef13
  1. 3
      libavformat/vividas.c

@ -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) {

Loading…
Cancel
Save