]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
staging: media: ompa4iss: Replace sprintf with snprintf
authorTapasweni Pathak <tapaswenipathak@gmail.com>
Tue, 7 Oct 2014 17:50:07 +0000 (23:20 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Oct 2014 02:29:16 +0000 (10:29 +0800)
This patch replaces sprintf with snprintf as sprintf does
not check for buffer overflow.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/omap4iss/iss_csi2.c

index 92c2d5b743c7cad0f0c4f50668a5358e3fa81fcd..47f86b306cb6957bba91f119d61610a4aed29c85 100644 (file)
@@ -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 */