Mercurial > libavformat.hg
comparison mov.c @ 2547:92bf4673d050 libavformat
stop parsing udta if size is wrong/garbage, fix issue 154, fix RQ004F14.MOV
author | bcoudurier |
---|---|
date | Wed, 12 Sep 2007 10:18:01 +0000 |
parents | fe59c768ecf7 |
children | 960795567b33 |
comparison
equal
deleted
inserted
replaced
2546:015aa98f3f12 | 2547:92bf4673d050 |
---|---|
1057 | 1057 |
1058 while (url_ftell(pb) + 8 < end) { | 1058 while (url_ftell(pb) + 8 < end) { |
1059 uint32_t tag_size = get_be32(pb); | 1059 uint32_t tag_size = get_be32(pb); |
1060 uint32_t tag = get_le32(pb); | 1060 uint32_t tag = get_le32(pb); |
1061 uint64_t next = url_ftell(pb) + tag_size - 8; | 1061 uint64_t next = url_ftell(pb) + tag_size - 8; |
1062 | |
1063 if (next > end) // stop if tag_size is wrong | |
1064 break; | |
1062 | 1065 |
1063 switch (tag) { | 1066 switch (tag) { |
1064 case MKTAG(0xa9,'n','a','m'): | 1067 case MKTAG(0xa9,'n','a','m'): |
1065 mov_parse_udta_string(pb, c->fc->title, sizeof(c->fc->title)); | 1068 mov_parse_udta_string(pb, c->fc->title, sizeof(c->fc->title)); |
1066 break; | 1069 break; |