Commit 7952ed58 authored by bcoudurier's avatar bcoudurier

move atom size check before parsing function search

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@8546 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent d5d7b824
......@@ -244,15 +244,14 @@ static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
if (a.size <= 8)
break;
}
for (i = 0; c->parse_table[i].type != 0L
&& c->parse_table[i].type != a.type; i++)
/* empty */;
a.size -= 8;
if(a.size < 0 || a.size > atom.size - total_size)
break;
for (i = 0; c->parse_table[i].type != 0L
&& c->parse_table[i].type != a.type; i++)
/* empty */;
if (c->parse_table[i].type == 0) { /* skip leaf atoms data */
url_fskip(pb, a.size);
} else {
......
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