aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-10-22 00:37:25 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-09-10 16:04:26 +0200
commit1b1ab7013e7bb08c2090d8b2ca84ff711cfb595b (patch)
tree5742484e44d4dad378dee4ebae523fa6c5464f93
parente653c2fec4e0db13ca5e3f5b06b2687e5d3e2a37 (diff)
downloadffmpeg-1b1ab7013e7bb08c2090d8b2ca84ff711cfb595b.tar.gz
avformat/segafilm: Check that there is a stream
Fixes: assertion failure Fixes: 26472/clusterfuzz-testcase-minimized-ffmpeg_dem_SEGAFILM_fuzzer-5759751591559168 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit c0d7fd269beed030fc767fee28d9dbe111bc4427) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/segafilm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c
index 777606bcb6..0ac9f32320 100644
--- a/libavformat/segafilm.c
+++ b/libavformat/segafilm.c
@@ -144,6 +144,9 @@ static int film_read_header(AVFormatContext *s)
film->video_type = AV_CODEC_ID_NONE;
}
+ if (!film->video_type && !film->audio_type)
+ return AVERROR_INVALIDDATA;
+
/* initialize the decoder streams */
if (film->video_type) {
st = avformat_new_stream(s, NULL);