From: Tapasweni Pathak Date: Tue, 7 Oct 2014 17:50:07 +0000 (+0530) Subject: staging: media: ompa4iss: Replace sprintf with snprintf X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d92c54f6c079988317c5c95bdd2dadf7ce71e45c;p=openwrt%2Fstaging%2Fblogic.git staging: media: ompa4iss: Replace sprintf with snprintf This patch replaces sprintf with snprintf as sprintf does not check for buffer overflow. Signed-off-by: Tapasweni Pathak Reviewed-by: Josh Triplett Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/media/omap4iss/iss_csi2.c b/drivers/staging/media/omap4iss/iss_csi2.c index 92c2d5b743c7..47f86b306cb6 100644 --- a/drivers/staging/media/omap4iss/iss_csi2.c +++ b/drivers/staging/media/omap4iss/iss_csi2.c @@ -1231,7 +1231,7 @@ static int csi2_init_entities(struct iss_csi2_device *csi2, const char *subname) v4l2_subdev_init(sd, &csi2_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); sd->grp_id = 1 << 16; /* group ID for iss subdevs */