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>
This commit is contained in:
Michael Niedermayer 2019-08-10 23:09:47 +02:00
parent 52b564ef13
commit 1d72b5d2d5
1 changed files with 1 additions and 1 deletions

View File

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