diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2007-03-29 10:45:34 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2007-03-29 10:45:34 +0000 |
commit | 11979c460c2891fe2dabd40501dc7ad53fe71d46 (patch) | |
tree | 120586bd6d314926ba78ba8d6f70d6627e66dd4d /libavformat/mov.c | |
parent | a097e559b2f3dc543327fc83773a8e68354b3d76 (diff) | |
download | ffmpeg-11979c460c2891fe2dabd40501dc7ad53fe71d46.tar.gz |
move atom size check before parsing function search
Originally committed as revision 8546 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index cbd0f760ee..e9b577576b 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -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 { |