Commit 7aed5ab4 authored by bcoudurier's avatar bcoudurier

check atom size against edit_count to avoid very long loop

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19198 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ccd21e3f
...@@ -1831,6 +1831,9 @@ static int mov_read_elst(MOVContext *c, ByteIOContext *pb, MOVAtom atom) ...@@ -1831,6 +1831,9 @@ static int mov_read_elst(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
get_be24(pb); /* flags */ get_be24(pb); /* flags */
edit_count = get_be32(pb); /* entries */ edit_count = get_be32(pb); /* entries */
if((uint64_t)edit_count*12+8 > atom.size)
return -1;
for(i=0; i<edit_count; i++){ for(i=0; i<edit_count; i++){
int time; int time;
int duration = get_be32(pb); /* Track duration */ int duration = get_be32(pb); /* Track duration */
......
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