avformat/vividas: Fix another infinite loop

Not found by the fuzzer

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 52b564ef13
commit 1d72b5d2d5
  1. 2
      libavformat/vividas.c

@ -546,7 +546,7 @@ static int viv_read_header(AVFormatContext *s)
break;
block_len = ffio_read_varlen(pb);
if (avio_feof(pb))
if (avio_feof(pb) || block_len <= 0)
return AVERROR_INVALIDDATA;
block_type = avio_r8(pb);

Loading…
Cancel
Save