Mercurial > mplayer.hg
changeset 18761:4168044c1be4
fix a buffer overflow causing a segfault
(original patch by Vladimir Voroshilov < voroshil _at_ univer.omsk.su >)
author | aurel |
---|---|
date | Tue, 20 Jun 2006 11:48:39 +0000 |
parents | 804179fbd77f |
children | 369074e0eb7b |
files | libmpdemux/tv.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);