[MPlayer-cvslog] CVS: main/libmpdemux demux_ts.c,1.51,1.52

Nico Sabbi CVS syncmail at mplayerhq.hu
Sat May 13 00:21:32 CEST 2006


CVS change done by Nico Sabbi CVS

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

Modified Files:
	demux_ts.c 
Log Message:
raised max extradata size and refuse to store more than the limit

Index: demux_ts.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ts.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- demux_ts.c	12 May 2006 21:34:06 -0000	1.51
+++ demux_ts.c	12 May 2006 22:21:29 -0000	1.52
@@ -114,10 +114,11 @@
 	int offset, buffer_size;
 } av_fifo_t;
 
+#define MAX_EXTRADATA_SIZE 64*1024
 typedef struct {
 	int32_t object_type;	//aka codec used
 	int32_t stream_type;	//video, audio etc.
-	uint8_t buf[4096];
+	uint8_t buf[MAX_EXTRADATA_SIZE];
 	uint16_t buf_size;
 	uint8_t szm1;
 } mp4_decoder_config_t;
@@ -1859,6 +1860,11 @@
 		mp_msg(MSGT_DEMUX, MSGL_DBG2, "%02x ", buf[i]);
 	mp_msg(MSGT_DEMUX, MSGL_DBG2, "\n");
 
+	if(len > MAX_EXTRADATA_SIZE)
+	{
+		mp_msg(MSGT_DEMUX, MSGL_ERR, "DEMUX_TS, EXTRADATA SUSPICIOUSLY BIG: %d, REFUSED\r\n", len);
+		return len;
+	}
 	memcpy(dec->buf, buf, len);
 	dec->buf_size = len;
 	




More information about the MPlayer-cvslog mailing list