aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-04-15 20:27:27 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-05-19 17:17:36 +0200
commit2cfb8f35cdb877c958398d65536eafaf39c23303 (patch)
treea53df929d10d869b04fbe8f7c9579413537e204d
parent68eeca280325bbf047040ac70e449115e9ff20ef (diff)
downloadffmpeg-2cfb8f35cdb877c958398d65536eafaf39c23303.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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/thp.c b/libavformat/thp.c
index ee5c78b6d3..f2cac5b3fb 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;
}