提交 11979c46 编写于 作者: B Baptiste Coudurier

move atom size check before parsing function search

Originally committed as revision 8546 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 a097e559
......@@ -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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册