Browse Source

stop parsing if tag size is wrongly < 8 to avoid infinite loop

Originally committed as revision 15401 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Baptiste Coudurier 17 years ago
parent
commit
4e240985d8
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/mov.c

+ 1
- 1
libavformat/mov.c View File

@@ -1379,7 +1379,7 @@ static int mov_read_udta(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
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) {


Loading…
Cancel
Save