diff options
Diffstat (limited to 'drivers/media/usb/pulse8-cec/pulse8-cec.c')
-rw-r--r-- | drivers/media/usb/pulse8-cec/pulse8-cec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/usb/pulse8-cec/pulse8-cec.c b/drivers/media/usb/pulse8-cec/pulse8-cec.c index b085b14f3f87..ea9ee74fa336 100644 --- a/drivers/media/usb/pulse8-cec/pulse8-cec.c +++ b/drivers/media/usb/pulse8-cec/pulse8-cec.c @@ -435,7 +435,7 @@ static int pulse8_setup(struct pulse8 *pulse8, struct serio *serio, err = pulse8_send_and_wait(pulse8, cmd, 1, cmd[0], 0); if (err) return err; - strncpy(log_addrs->osd_name, data, 13); + strscpy(log_addrs->osd_name, data, sizeof(log_addrs->osd_name)); dev_dbg(pulse8->dev, "OSD name: %s\n", log_addrs->osd_name); return 0; @@ -566,7 +566,7 @@ static int pulse8_cec_adap_log_addr(struct cec_adapter *adap, u8 log_addr) char *osd_str = cmd + 1; cmd[0] = MSGCODE_SET_OSD_NAME; - strncpy(cmd + 1, adap->log_addrs.osd_name, 13); + strscpy(cmd + 1, adap->log_addrs.osd_name, sizeof(cmd) - 1); if (osd_len < 4) { memset(osd_str + osd_len, ' ', 4 - osd_len); osd_len = 4; |