[MPlayer-cvslog] CVS: main/libmpdemux dvbin.c,1.19,1.20

Nico Sabbi CVS syncmail at mplayerhq.hu
Sat May 13 11:01:20 CEST 2006


CVS change done by Nico Sabbi CVS

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

Modified Files:
	dvbin.c 
Log Message:
unconditionally stop allocating memory for dvb_channel_t after 1 MB: it's unreasonably big

Index: dvbin.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/dvbin.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- dvbin.c	12 Mar 2006 11:45:27 -0000	1.19
+++ dvbin.c	13 May 2006 09:01:18 -0000	1.20
@@ -387,6 +387,11 @@
 		list->channels = tmp;
 		memcpy(&(list->channels[list->NUM_CHANNELS]), ptr, sizeof(dvb_channel_t));
 		list->NUM_CHANNELS++;
+		if(sizeof(dvb_channel_t) * list->NUM_CHANNELS >= 1024*1024)
+		{
+			mp_msg(MSGT_DEMUX, MSGL_V, "dvbin.c, > 1MB allocated for channels struct, dropping the rest of the file\r\n");
+			break;
+		}
 	}
 
 	fclose(f);




More information about the MPlayer-cvslog mailing list