diff options
author | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-10 16:20:42 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-09-11 13:32:17 -0400 |
commit | cc1e6315e83db0e517dd9279050b88adc83a7eba (patch) | |
tree | 2fab5c7b2a4f3f50a045357a41c419fccc975de2 /drivers/media/platform/via-camera.c | |
parent | c0decac19da3906d9b66291e57b7759489e1170f (diff) | |
download | linux-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.c | 6 |
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; |