mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-24 12:10:18 +08:00
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
This commit is contained in:
+2
-1
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user