[FFmpeg-cvslog] avformat/thp: Require a video stream

Michael Niedermayer git at videolan.org
Sun Jul 5 20:50:00 EEST 2020


ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Wed Apr 15 20:27:27 2020 +0200| [88803439748f5843d7e380b9b65d5401b22a4c8c] | committer: Michael Niedermayer

avformat/thp: Require a video stream

The demuxer code assumes the existence of a video stream

Fixes: assertion failure
Fixes: 21512/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5699660783288320

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 97c78caf3e8f7ec4df3d3123b5e8d0e7541319e6)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavformat/thp.c b/libavformat/thp.c
index 727fb5095c..16fa327002 100644
--- a/libavformat/thp.c
+++ b/libavformat/thp.c
@@ -143,6 +143,9 @@ static int thp_read_header(AVFormatContext *s)
         }
     }
 
+    if (!thp->vst)
+        return AVERROR_INVALIDDATA;
+
     return 0;
 }
 



More information about the ffmpeg-cvslog mailing list