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:
authorFredrik Hubinette <hubbe@google.com>2017-11-16 04:24:30 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2018-01-09 01:19:14 +0300
commit7d14046740234e26e01c4e097a09a58ffcadb8e8 (patch)
tree6c81dc8650e68c4e415dc97031d043b80c4225fb
parente69edb7aef67b01e94c1298b34366570dc83d717 (diff)
avformat/mov: Check size of STSC allocation
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit a6fdd75fe6440d2f4150cb456a9078aa68b00fdb) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/mov.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index b97aa001a3..7547c78957 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2390,6 +2390,8 @@ static int mov_read_stsc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_rb24(pb); /* flags */
entries = avio_rb32(pb);
+ if ((uint64_t)entries * 12 + 4 > atom.size)
+ return AVERROR_INVALIDDATA;
av_log(c->fc, AV_LOG_TRACE, "track[%i].stsc.entries = %i\n", c->fc->nb_streams-1, entries);