You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-05-16 08:38:24 +02:00
matroskadec: fix NULL pointer dereference in webm_dash_manifest_read_header
The code assumes that s->streams[0] is valid.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit ff100c9dd9)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
@@ -3465,6 +3465,11 @@ static int webm_dash_manifest_read_header(AVFormatContext *s)
|
||||
av_log(s, AV_LOG_ERROR, "Failed to read file headers\n");
|
||||
return -1;
|
||||
}
|
||||
if (!s->nb_streams) {
|
||||
matroska_read_close(s);
|
||||
av_log(s, AV_LOG_ERROR, "No streams found\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (!matroska->is_live) {
|
||||
buf = av_asprintf("%g", matroska->duration);
|
||||
|
||||
Reference in New Issue
Block a user