diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-04-15 20:27:27 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-07-01 12:49:26 +0200 |
commit | 5be59bb8a1de1ba6d166c11fed86fef54254095d (patch) | |
tree | 08b505efffdc90bd06fdca1785c6224e81980a5b | |
parent | 3153dae3796540f40e9b2b50fbaf71077422804b (diff) | |
download | ffmpeg-5be59bb8a1de1ba6d166c11fed86fef54254095d.tar.gz |
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@niedermayer.cc>
(cherry picked from commit 97c78caf3e8f7ec4df3d3123b5e8d0e7541319e6)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/thp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/thp.c b/libavformat/thp.c index 76b9b3820c..38db4da89a 100644 --- a/libavformat/thp.c +++ b/libavformat/thp.c @@ -145,6 +145,9 @@ static int thp_read_header(AVFormatContext *s) } } + if (!thp->vst) + return AVERROR_INVALIDDATA; + return 0; } |