diff options
author | aurel <aurel@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-06-20 11:48:39 +0000 |
---|---|---|
committer | aurel <aurel@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-06-20 11:48:39 +0000 |
commit | 95db10787dabb893ea6ad93fa0de5d072a3b91c2 (patch) | |
tree | 712dc5d26eef4e38e39aef6847037db287703456 | |
parent | 05a3579b3ce8b2888e2102c57d6b905254fd25bd (diff) | |
download | mpv-95db10787dabb893ea6ad93fa0de5d072a3b91c2.tar.bz2 mpv-95db10787dabb893ea6ad93fa0de5d072a3b91c2.tar.xz |
fix a buffer overflow causing a segfault
(original patch by Vladimir Voroshilov < voroshil _at_ univer.omsk.su >)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18764 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpdemux/tv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libmpdemux/tv.c b/libmpdemux/tv.c index 3939ab11f5..7433d86337 100644 --- a/libmpdemux/tv.c +++ b/libmpdemux/tv.c @@ -331,7 +331,8 @@ static int open_tv(tvi_handle_t *tvh) 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); |