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

reimar subversion at mplayerhq.hu
Fri Jul 4 17:47:31 CEST 2008


Author: reimar
Date: Fri Jul  4 17:47:31 2008
New Revision: 27194

Log:
Check stdata_len before accessing stdata. Fixes bug #1125


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  4 17:47:31 2008
@@ -657,6 +657,10 @@ static int gen_sh_audio(sh_audio_t* sh, 
 //      36  char[]  	atom data (len=size-8)
 
 // TODO: fix parsing for files using version 2.
+		if (trak->stdata_len < 26) {
+		  mp_msg(MSGT_DEMUX, MSGL_WARN, "MOV: broken (too small) sound atom!\n");
+		  return 0;
+		}
 		version=char2short(trak->stdata,8);
 		if (version > 1)
 		  mp_msg(MSGT_DEMUX, MSGL_WARN, "MOV: version %d sound atom may not parse correctly!\n", version);



More information about the MPlayer-cvslog mailing list