media: use strscpy() instead of strlcpy()
The implementation of strscpy() is more robust and safer. That's now the recommended way to copy NUL terminated strings. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
@@ -2641,7 +2641,7 @@ static int ccdc_init_entities(struct isp_ccdc_device *ccdc)
|
||||
|
||||
v4l2_subdev_init(sd, &ccdc_v4l2_ops);
|
||||
sd->internal_ops = &ccdc_v4l2_internal_ops;
|
||||
strlcpy(sd->name, "OMAP3 ISP CCDC", sizeof(sd->name));
|
||||
strscpy(sd->name, "OMAP3 ISP CCDC", sizeof(sd->name));
|
||||
sd->grp_id = 1 << 16; /* group ID for isp subdevs */
|
||||
v4l2_set_subdevdata(sd, ccdc);
|
||||
sd->flags |= V4L2_SUBDEV_FL_HAS_EVENTS | V4L2_SUBDEV_FL_HAS_DEVNODE;
|
||||
|
Reference in New Issue
Block a user