summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/bt8xx
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-10 14:19:16 +0200
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-03-29 15:26:13 +0100
commit85709cbf152465c77a9c2de48a6f4ef23c8c3d83 (patch)
tree4dc492b6da48d0d1f9ede150c0c2386f4efb6438 /drivers/media/pci/bt8xx
parentmedia: vim2m: Fix RGB 565 BE/LE support (diff)
downloadlinux-85709cbf152465c77a9c2de48a6f4ef23c8c3d83.tar.xz
linux-85709cbf152465c77a9c2de48a6f4ef23c8c3d83.zip
media: replace strncpy() by strscpy()
The strncpy() function is being deprecated upstream. Replace it by the safer strscpy(). While here, replace a few occurences of strlcpy() that were recently added to also use strscpy(). Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/pci/bt8xx')
-rw-r--r--drivers/media/pci/bt8xx/dst.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/pci/bt8xx/dst.c b/drivers/media/pci/bt8xx/dst.c
index c94318c71a0c..3315a6d67edf 100644
--- a/drivers/media/pci/bt8xx/dst.c
+++ b/drivers/media/pci/bt8xx/dst.c
@@ -1100,7 +1100,8 @@ static int dst_get_device_id(struct dst_state *state)
/* Card capabilities */
state->dst_hw_cap = p_dst_type->dst_feature;
pr_err("Recognise [%s]\n", p_dst_type->device_id);
- strncpy(&state->fw_name[0], p_dst_type->device_id, 6);
+ strscpy((char *)state->fw_name, p_dst_type->device_id,
+ sizeof(state->fw_name));
/* Multiple tuners */
if (p_dst_type->tuner_type & TUNER_TYPE_MULTI) {
switch (use_dst_type) {