Commit a6fdd75f authored by Fredrik Hubinette's avatar Fredrik Hubinette Committed by Michael Niedermayer

avformat/mov: Check size of STSC allocation

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent ac922f94
......@@ -2595,6 +2595,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[%u].stsc.entries = %u\n", c->fc->nb_streams - 1, entries);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment