Browse Source

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>
tags/n4.4
Michael Niedermayer 5 years ago
parent
commit
c0d7fd269b
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavformat/segafilm.c

+ 3
- 0
libavformat/segafilm.c View File

@@ -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);


Loading…
Cancel
Save