[MPlayer-cvslog] r27264 - trunk/libmpdemux/demux_mov.c

reimar subversion at mplayerhq.hu
Fri Jul 11 23:59:18 CEST 2008


Author: reimar
Date: Fri Jul 11 23:59:17 2008
New Revision: 27264

Log:
Add atom_len sanity check to mov demuxer.
Fixes bug #1168


Modified:
   trunk/libmpdemux/demux_mov.c

Modified: trunk/libmpdemux/demux_mov.c
==============================================================================
--- trunk/libmpdemux/demux_mov.c	(original)
+++ trunk/libmpdemux/demux_mov.c	Fri Jul 11 23:59:17 2008
@@ -772,6 +772,7 @@ static int gen_sh_audio(sh_audio_t* sh, 
 		}
 		if (trak->stdata_len >= 36 + adjust) {
 		    int atom_len = char2int(trak->stdata,28+adjust);
+		    if (atom_len < 0 || atom_len > trak->stdata_len - 28 - adjust) atom_len = trak->stdata_len - 28 - adjust;
 		    switch(char2int(trak->stdata,32+adjust)) { // atom type
 		      case MOV_FOURCC('e','s','d','s'): {
 			mp_msg(MSGT_DEMUX, MSGL_V, "MOV: Found MPEG4 audio Elementary Stream Descriptor atom (%d)!\n", atom_len);



More information about the MPlayer-cvslog mailing list