summaryrefslogtreecommitdiff
path: root/drivers/media/pci/sta2x11
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-10 23:20:42 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-11 20:32:17 +0300
commitcc1e6315e83db0e517dd9279050b88adc83a7eba (patch)
tree2fab5c7b2a4f3f50a045357a41c419fccc975de2 /drivers/media/pci/sta2x11
parentc0decac19da3906d9b66291e57b7759489e1170f (diff)
downloadlinux-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/pci/sta2x11')
-rw-r--r--drivers/media/pci/sta2x11/sta2x11_vip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c
index 1858efedaf1a..411177ec4d72 100644
--- a/drivers/media/pci/sta2x11/sta2x11_vip.c
+++ b/drivers/media/pci/sta2x11/sta2x11_vip.c
@@ -419,8 +419,8 @@ static int vidioc_querycap(struct file *file, void *priv,
{
struct sta2x11_vip *vip = video_drvdata(file);
- strcpy(cap->driver, KBUILD_MODNAME);
- strcpy(cap->card, KBUILD_MODNAME);
+ strscpy(cap->driver, KBUILD_MODNAME, sizeof(cap->driver));
+ strscpy(cap->card, KBUILD_MODNAME, sizeof(cap->card));
snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI:%s",
pci_name(vip->pdev));
cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE |
@@ -580,7 +580,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
if (f->index != 0)
return -EINVAL;
- strcpy(f->description, "4:2:2, packed, UYVY");
+ strscpy(f->description, "4:2:2, packed, UYVY", sizeof(f->description));
f->pixelformat = V4L2_PIX_FMT_UYVY;
f->flags = 0;
return 0;