aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-08-10 23:09:47 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-09-04 20:26:35 +0200
commit4d7bbeb16405aba833a582b8d57b88671f3844b8 (patch)
treec08272a102a6296ae55ab6a4c29cd6dd3258a363
parentf5c6f81576928c7d5b219a7e8f49718fa7a0874c (diff)
downloadffmpeg-4d7bbeb16405aba833a582b8d57b88671f3844b8.tar.gz
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> (cherry picked from commit 1d72b5d2d5225dde0662a1f2083a27f86a8fdb98) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/vividas.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/vividas.c b/libavformat/vividas.c
index a5f33181de..0c33ca2da8 100644
--- a/libavformat/vividas.c
+++ b/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);