Commit d92c54f6 authored by Tapasweni Pathak's avatar Tapasweni Pathak Committed by Greg Kroah-Hartman

staging: media: ompa4iss: Replace sprintf with snprintf

This patch replaces sprintf with snprintf as sprintf does
not check for buffer overflow.
Signed-off-by: default avatarTapasweni Pathak <tapaswenipathak@gmail.com>
Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b717a65a
...@@ -1231,7 +1231,7 @@ static int csi2_init_entities(struct iss_csi2_device *csi2, const char *subname) ...@@ -1231,7 +1231,7 @@ static int csi2_init_entities(struct iss_csi2_device *csi2, const char *subname)
v4l2_subdev_init(sd, &csi2_ops); v4l2_subdev_init(sd, &csi2_ops);
sd->internal_ops = &csi2_internal_ops; sd->internal_ops = &csi2_internal_ops;
sprintf(name, "CSI2%s", subname); snprintf(name, sizeof(name), "CSI2%s", subname);
snprintf(sd->name, sizeof(sd->name), "OMAP4 ISS %s", name); snprintf(sd->name, sizeof(sd->name), "OMAP4 ISS %s", name);
sd->grp_id = 1 << 16; /* group ID for iss subdevs */ sd->grp_id = 1 << 16; /* group ID for iss subdevs */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment