avformat/mov: Check size of STSC allocation
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a6fdd75fe6)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
7b16eacf81
commit
53715eb13e
1 changed files with 2 additions and 0 deletions
|
|
@ -2422,6 +2422,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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue