Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-11-08 02:42:23 +0300
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-11-18 01:14:52 +0300
commitfa24e3780b7753a16c478dc3bff2f7b0319df5e5 (patch)
tree1141720400489a88bd4f9530640255e9312cc3e5 /libavformat
parent1e4979f780a8b80f0ca9ed7bafa2fbbdfd54413a (diff)
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 ff100c9dd97d2f1f456ff38b192edf84f9744738) Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/matroskadec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 32f5e49f0c..130d92e8a7 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -3772,6 +3772,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);