summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/via-camera.c
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/platform/via-camera.c
parentc0decac19da3906d9b66291e57b7759489e1170f (diff)
downloadlinux-cc1e6315e83db0e517dd9279050b88adc83a7eba.tar.bz2
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/platform/via-camera.c')
-rw-r--r--drivers/media/platform/via-camera.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/platform/via-camera.c b/drivers/media/platform/via-camera.c
index 554870e48750..24d5759501a5 100644
--- a/drivers/media/platform/via-camera.c
+++ b/drivers/media/platform/via-camera.c
@@ -812,7 +812,7 @@ static int viacam_enum_input(struct file *filp, void *priv,
input->type = V4L2_INPUT_TYPE_CAMERA;
input->std = V4L2_STD_ALL; /* Not sure what should go here */
- strcpy(input->name, "Camera");
+ strscpy(input->name, "Camera", sizeof(input->name));
return 0;
}
@@ -990,8 +990,8 @@ out:
static int viacam_querycap(struct file *filp, void *priv,
struct v4l2_capability *cap)
{
- strcpy(cap->driver, "via-camera");
- strcpy(cap->card, "via-camera");
+ strscpy(cap->driver, "via-camera", sizeof(cap->driver));
+ strscpy(cap->card, "via-camera", sizeof(cap->card));
cap->device_caps = V4L2_CAP_VIDEO_CAPTURE |
V4L2_CAP_READWRITE | V4L2_CAP_STREAMING;
cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;