mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-06 04:28:38 +00:00
stop parsing if tag size is wrongly < 8 to avoid infinite loop
Originally committed as revision 15401 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
f2d65a6c8a
commit
4e240985d8
@ -1379,7 +1379,7 @@ static int mov_read_udta(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
|
|||||||
uint32_t tag = get_le32(pb);
|
uint32_t tag = get_le32(pb);
|
||||||
uint64_t next = url_ftell(pb) + tag_size - 8;
|
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;
|
break;
|
||||||
|
|
||||||
switch (tag) {
|
switch (tag) {
|
||||||
|
Loading…
Reference in New Issue
Block a user