diff options
author | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-10 23:20:42 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-11 20:32:17 +0300 |
commit | cc1e6315e83db0e517dd9279050b88adc83a7eba (patch) | |
tree | 2fab5c7b2a4f3f50a045357a41c419fccc975de2 /drivers/media/usb/pulse8-cec | |
parent | c0decac19da3906d9b66291e57b7759489e1170f (diff) | |
download | linux-cc1e6315e83db0e517dd9279050b88adc83a7eba.tar.xz |
media: replace strcpy() by strscpy()
The strcpy() function is being deprecated upstream. Replace
it by the safer strscpy().
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/usb/pulse8-cec')
-rw-r--r-- | drivers/media/usb/pulse8-cec/pulse8-cec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/usb/pulse8-cec/pulse8-cec.c b/drivers/media/usb/pulse8-cec/pulse8-cec.c index 350635826aae..365c78b748dd 100644 --- a/drivers/media/usb/pulse8-cec/pulse8-cec.c +++ b/drivers/media/usb/pulse8-cec/pulse8-cec.c @@ -571,7 +571,8 @@ static int pulse8_cec_adap_log_addr(struct cec_adapter *adap, u8 log_addr) memset(osd_str + osd_len, ' ', 4 - osd_len); osd_len = 4; osd_str[osd_len] = '\0'; - strcpy(adap->log_addrs.osd_name, osd_str); + strscpy(adap->log_addrs.osd_name, osd_str, + sizeof(adap->log_addrs.osd_name)); } err = pulse8_send_and_wait(pulse8, cmd, 1 + osd_len, MSGCODE_COMMAND_ACCEPTED, 0); |