aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-11-05 21:52:41 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2019-12-31 19:51:56 +0100
commitf21ef41c1437edeb8d249aa5ec00253467eba159 (patch)
tree07693872f2d7a0baf2295688fd1b2817b935a357
parent31240bb703a72c88be5b3d58eaaf8c2a89fb4a76 (diff)
downloadffmpeg-f21ef41c1437edeb8d249aa5ec00253467eba159.tar.gz
avformat/vividas: Check and require 1 video stream
The decoder hardcodes that audio is stream_id = 1 so it does not currently work with more or less than 1 video stream at st=0 Fixes: assertion failure Fixes: 18602/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6259277199310848 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 3e5a528bbe85a3a00640bc2739c11ee07eb05485) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/vividas.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/vividas.c b/libavformat/vividas.c
index a55f5c0ead..bf19b55f51 100644
--- a/libavformat/vividas.c
+++ b/libavformat/vividas.c
@@ -311,8 +311,10 @@ static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t *
num_video = avio_r8(pb);
avio_seek(pb, off, SEEK_SET);
- if (num_video != 1)
- av_log(s, AV_LOG_WARNING, "number of video tracks %d is not 1\n", num_video);
+ if (num_video != 1) {
+ av_log(s, AV_LOG_ERROR, "number of video tracks %d is not 1\n", num_video);
+ return AVERROR_PATCHWELCOME;
+ }
for (i = 0; i < num_video; i++) {
AVStream *st = avformat_new_stream(s, NULL);