drivers/staging/media/go7007: using strlcpy instead of strncpy
Subsystems (2)
PATCH 1/1 drivers/staging/media/go7007: using strlcpy instead of strncpy
better to treate them as NUL terminated string.
Signed-off-by Chen Gang <[email protected]>
--- drivers/staging/media/go7007/go7007-v4l2.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/media/go7007/go7007-v4l2.c +2 -2
@@ -637,7 +637,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, fmt->type =V4L2_BUF_TYPE_VIDEO_CAPTURE ; fmt->flags =V4L2_FMT_FLAG_COMPRESSED ; -strncpy (fmt->description, desc,sizeof (fmt->description)); +strlcpy (fmt->description, desc,sizeof (fmt->description));return 0 ; }
@@ -1181,7 +1181,7 @@ static int vidioc_enum_input(struct file *file, void *priv,if (inp->index >= go->board_info->num_inputs)return -EINVAL ; -strncpy (inp->name, go->board_info->inputs[inp->index].name, +strlcpy (inp->name, go->board_info->inputs[inp->index].name,sizeof (inp->name));/* If this board has a tuner, it will be the last input */
Signature · 1 line
1.7.7.6