mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
avformat/mov: Disallow empty sidx
It appears this is not allowed "Each Segment Index box documents how a (sub)segment is divided into one or more subsegments (which may themselves be further subdivided using Segment Index boxes)." Fixes: Null pointer dereference Fixes: Ticket9517 Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 4419433d77278cb742944c4514be5f72a04103c0) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
34b6731e78
commit
5a67ee5797
@ -5041,6 +5041,8 @@ static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
avio_rb16(pb); // reserved
|
||||
|
||||
item_count = avio_rb16(pb);
|
||||
if (item_count == 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
for (i = 0; i < item_count; i++) {
|
||||
int index;
|
||||
|
Loading…
x
Reference in New Issue
Block a user