mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
staging: media: atomisp: replace sprintf() with strscpy()
Auditing calls to sprintf(). This code is fine because we are copying 9 characters into a 52 character buffer. But it would be cleaner to use strscpy() instead. Additionally, the 2-argument version of strscpy() checks at compile time that dst is an array, not just a pointer. This is the only sprintf() call in the whole driver. Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
This commit is contained in:
parent
0812f34bf5
commit
c565afd284
|
|
@ -808,7 +808,7 @@ static int isp_subdev_init_entities(struct atomisp_sub_device *asd)
|
|||
int ret;
|
||||
|
||||
v4l2_subdev_init(sd, &isp_subdev_v4l2_ops);
|
||||
sprintf(sd->name, "Atom ISP");
|
||||
strscpy(sd->name, "Atom ISP");
|
||||
v4l2_set_subdevdata(sd, asd);
|
||||
sd->flags |= V4L2_SUBDEV_FL_HAS_EVENTS | V4L2_SUBDEV_FL_HAS_DEVNODE;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user