OSDN Git Service

break if atom size is more than size left in container atom, fix shooter.mov
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Thu, 29 Mar 2007 10:37:07 +0000 (10:37 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Thu, 29 Mar 2007 10:37:07 +0000 (10:37 +0000)
Originally committed as revision 8544 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/mov.c

index ce8afbc..83dcdf0 100644 (file)
@@ -250,7 +250,7 @@ static int mov_read_default(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
 
         a.size -= 8;
 
-        if(a.size < 0)
+        if(a.size < 0 || a.size > atom.size - total_size)
             break;
 
         if (c->parse_table[i].type == 0) { /* skip leaf atoms data */