mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02:00
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>
This commit is contained in:
parent
4171249d76
commit
74677deaca
@ -2248,6 +2248,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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user