Mercurial > libavformat.hg
changeset 6467:bae1afdd961a libavformat
Check dref size based on a patch by google
author | bcoudurier |
---|---|
date | Wed, 08 Sep 2010 20:20:24 +0000 |
parents | 35bb7cdfe337 |
children | 317dedc6b9a2 |
files | mov.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mov.c Wed Sep 08 20:18:14 2010 +0000 +++ b/mov.c Wed Sep 08 20:20:24 2010 +0000 @@ -345,6 +345,9 @@ uint32_t size = get_be32(pb); int64_t next = url_ftell(pb) + size - 4; + if (size < 12) + return -1; + dref->type = get_le32(pb); get_be32(pb); // version + flags dprintf(c->fc, "type %.4s size %d\n", (char*)&dref->type, size);