[MPlayer-cvslog] r18764 - trunk/libmpdemux/tv.c

aurel subversion at mplayerhq.hu
Tue Jun 20 13:48:40 CEST 2006


Author: aurel
Date: Tue Jun 20 13:48:39 2006
New Revision: 18764

Modified:
   trunk/libmpdemux/tv.c

Log:
fix a buffer overflow causing a segfault
(original patch by Vladimir Voroshilov < voroshil _at_ univer.omsk.su >)


Modified: trunk/libmpdemux/tv.c
==============================================================================
--- trunk/libmpdemux/tv.c	(original)
+++ trunk/libmpdemux/tv.c	Tue Jun 20 13:48:39 2006
@@ -331,7 +331,8 @@
 
 		if (!sep) continue; // Wrong syntax, but mplayer should not crash
 
-		strcpy(tv_channel_current->name, sep + 1);
+		strlcpy(tv_channel_current->name, sep + 1,
+		        sizeof(tv_channel_current->name));
 		sep[0] = '\0';
 		strncpy(tv_channel_current->number, tmp, 5);
 



More information about the MPlayer-cvslog mailing list