[FFmpeg-cvslog] avformat/vividas: Fix infinite loop in header parser

Michael Niedermayer git at videolan.org
Sun Aug 11 20:16:06 EEST 2019


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Aug 10 23:09:46 2019 +0200| [52b564ef13237bfbb31a4103d29828dba9d14984] | committer: Michael Niedermayer

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 at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52b564ef13237bfbb31a4103d29828dba9d14984
---

 libavformat/vividas.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/vividas.c b/libavformat/vividas.c
index e70c9164a1..a5f33181de 100644
--- a/libavformat/vividas.c
+++ b/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) {



More information about the ffmpeg-cvslog mailing list