Mercurial > libavformat.hg
changeset 1964:4571a481081d libavformat
move atom size check before parsing function search
author | bcoudurier |
---|---|
date | Thu, 29 Mar 2007 10:45:34 +0000 |
parents | 81268e2bd9aa |
children | f73b9a471583 |
files | mov.c |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mov.c Thu Mar 29 10:42:22 2007 +0000 +++ b/mov.c Thu Mar 29 10:45:34 2007 +0000 @@ -244,15 +244,14 @@ if (a.size <= 8) break; } + 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 */; - a.size -= 8; - - if(a.size < 0 || a.size > atom.size - total_size) - break; - if (c->parse_table[i].type == 0) { /* skip leaf atoms data */ url_fskip(pb, a.size); } else {