From 85709cbf152465c77a9c2de48a6f4ef23c8c3d83 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 10 Sep 2018 08:19:16 -0400 Subject: media: replace strncpy() by strscpy() The strncpy() function is being deprecated upstream. Replace it by the safer strscpy(). While here, replace a few occurences of strlcpy() that were recently added to also use strscpy(). Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/davinci/vpif_capture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/media/platform/davinci/vpif_capture.c') diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index 6216b7ac6875..b5aacb0fb96b 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -1254,7 +1254,8 @@ static int vpif_s_dv_timings(struct file *file, void *priv, } else { std_info->l5 = std_info->vsize - (bt->vfrontporch - 1); } - strncpy(std_info->name, "Custom timings BT656/1120", VPIF_MAX_NAME); + strscpy(std_info->name, "Custom timings BT656/1120", + sizeof(std_info->name)); std_info->width = bt->width; std_info->height = bt->height; std_info->frm_fmt = bt->interlaced ? 0 : 1; -- cgit v1.2.3