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 <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
@@ -327,7 +327,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));
|
||||
strscpy(fmt->description, desc, sizeof(fmt->description));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user