Mercurial > libavformat.hg
changeset 3935:d30c8469093d libavformat
stop parsing if tag size is wrongly < 8 to avoid infinite loop
author | bcoudurier |
---|---|
date | Wed, 24 Sep 2008 18:55:00 +0000 |
parents | 1aa5e41ceaef |
children | 6154f62ef652 |
files | mov.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mov.c Wed Sep 24 17:46:23 2008 +0000 +++ b/mov.c Wed Sep 24 18:55:00 2008 +0000 @@ -1379,7 +1379,7 @@ uint32_t tag = get_le32(pb); uint64_t next = url_ftell(pb) + tag_size - 8; - if (next > end) // stop if tag_size is wrong + if (tag_size < 8 || next > end) // stop if tag_size is wrong break; switch (tag) {