# HG changeset patch # User aurel # Date 1150804119 0 # Node ID 4168044c1be4e6c3a338dd5c78a14d2b5f41a6dc # Parent 804179fbd77f8cdd807e0dcbde1279d796e8d852 fix a buffer overflow causing a segfault (original patch by Vladimir Voroshilov < voroshil _at_ univer.omsk.su >) diff -r 804179fbd77f -r 4168044c1be4 libmpdemux/tv.c --- a/libmpdemux/tv.c Tue Jun 20 11:08:01 2006 +0000 +++ b/libmpdemux/tv.c Tue Jun 20 11:48:39 2006 +0000 @@ -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);