[Ffmpeg-cvslog] r8546 - trunk/libavformat/mov.c

bcoudurier subversion
Thu Mar 29 12:45:34 CEST 2007


Author: bcoudurier
Date: Thu Mar 29 12:45:34 2007
New Revision: 8546

Modified:
   trunk/libavformat/mov.c

Log:
move atom size check before parsing function search

Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c	(original)
+++ trunk/libavformat/mov.c	Thu Mar 29 12:45:34 2007
@@ -244,15 +244,14 @@ static int mov_read_default(MOVContext *
             if (a.size <= 8)
                 break;
         }
-        for (i = 0; c->parse_table[i].type != 0L
-             && c->parse_table[i].type != a.type; i++)
-            /* empty */;
-
         a.size -= 8;
-
         if(a.size < 0 || a.size > atom.size - total_size)
             break;
 
+        for (i = 0; c->parse_table[i].type != 0L
+             && c->parse_table[i].type != a.type; i++)
+            /* empty */;
+
         if (c->parse_table[i].type == 0) { /* skip leaf atoms data */
             url_fskip(pb, a.size);
         } else {




More information about the ffmpeg-cvslog mailing list