[MPlayer-cvslog] CVS: main/libmpdemux aviheader.c,1.73,1.74

Ivan Kalvachev CVS syncmail at mplayerhq.hu
Thu Apr 6 22:04:05 CEST 2006


CVS change done by Ivan Kalvachev CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv22591

Modified Files:
	aviheader.c 
Log Message:
Limit the number of entires to the amount that does fit into the chunk.
the function need rewrite as it assumes quite many things that are not guaranteed by the specifications.


Index: aviheader.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/aviheader.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- aviheader.c	29 Mar 2006 19:31:31 -0000	1.73
+++ aviheader.c	6 Apr 2006 20:04:02 -0000	1.74
@@ -224,6 +224,11 @@
       memset(s->dwReserved, 0, 3*4);
 	  
       print_avisuperindex_chunk(s,MSGL_V);
+      
+      if( ((chunksize/4)/s->wLongsPerEntry) < s->nEntriesInUse){
+        mp_msg (MSGT_HEADER, MSGL_WARN, "Broken super index chunk\n");
+        s->nEntriesInUse = (chunksize/4)/s->wLongsPerEntry;
+      }
 
       // Check and fix this useless crap
       if(s->wLongsPerEntry != sizeof (avisuperindex_entry)/4) {




More information about the MPlayer-cvslog mailing list