[MPlayer-cvslog] CVS: main/libmpdemux demux_mov.c,1.122,1.123

Reimar Döffinger CVS syncmail at mplayerhq.hu
Mon Jun 20 16:32:54 CEST 2005


CVS change done by Reimar Döffinger CVS

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

Modified Files:
	demux_mov.c 
Log Message:
avoid bad memory access


Index: demux_mov.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mov.c,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -r1.122 -r1.123
--- demux_mov.c	20 Jun 2005 14:16:59 -0000	1.122
+++ demux_mov.c	20 Jun 2005 14:32:51 -0000	1.123
@@ -996,7 +996,9 @@
 		  }
 		}
 
-		if((trak->stdata[9]==0 || trak->stdata[9]==1) && trak->stdata_len >= 36) { // version 0 with extra atoms
+		if ((trak->stdata[9] == 0 && trak->stdata_len >= 36) ||
+		    (trak->stdata[9] == 1 && trak->stdata_len >= 36 + 48)) {
+		    // version 0 with extra atoms
         int adjust = (trak->stdata[9]==1)?48:0;
 		    int atom_len = char2int(trak->stdata,28+adjust);
 		    switch(char2int(trak->stdata,32+adjust)) { // atom type




More information about the MPlayer-cvslog mailing list