mirror of
https://github.com/mpv-player/mpv
synced 2024-12-12 01:46:16 +00: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:
parent
05a3579b3c
commit
95db10787d
@ -331,7 +331,8 @@ static int open_tv(tvi_handle_t *tvh)
|
|||||||
|
|
||||||
if (!sep) continue; // Wrong syntax, but mplayer should not crash
|
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';
|
sep[0] = '\0';
|
||||||
strncpy(tv_channel_current->number, tmp, 5);
|
strncpy(tv_channel_current->number, tmp, 5);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user