summaryrefslogtreecommitdiff
path: root/drivers/media/usb/zr364xx
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-10 16:20:42 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-11 13:32:17 -0400
commitcc1e6315e83db0e517dd9279050b88adc83a7eba (patch)
tree2fab5c7b2a4f3f50a045357a41c419fccc975de2 /drivers/media/usb/zr364xx
parentc0decac19da3906d9b66291e57b7759489e1170f (diff)
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/zr364xx')
-rw-r--r--drivers/media/usb/zr364xx/zr364xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/usb/zr364xx/zr364xx.c b/drivers/media/usb/zr364xx/zr364xx.c
index 0ba98583c736..ab35554cbffa 100644
--- a/drivers/media/usb/zr364xx/zr364xx.c
+++ b/drivers/media/usb/zr364xx/zr364xx.c
@@ -719,7 +719,7 @@ static int zr364xx_vidioc_enum_input(struct file *file, void *priv,
{
if (i->index != 0)
return -EINVAL;
- strcpy(i->name, DRIVER_DESC " Camera");
+ strscpy(i->name, DRIVER_DESC " Camera", sizeof(i->name));
i->type = V4L2_INPUT_TYPE_CAMERA;
return 0;
}
@@ -765,7 +765,7 @@ static int zr364xx_vidioc_enum_fmt_vid_cap(struct file *file,
if (f->index > 0)
return -EINVAL;
f->flags = V4L2_FMT_FLAG_COMPRESSED;
- strcpy(f->description, formats[0].name);
+ strscpy(f->description, formats[0].name, sizeof(f->description));
f->pixelformat = formats[0].fourcc;
return 0;
}