From: Kees Cook Date: Mon, 8 Jun 2015 22:30:53 +0000 (-0700) Subject: fbdev: omap2: remove potential format string leak X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7e46cd705fd8aa458590ad38cf896b5aff525334;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git fbdev: omap2: remove potential format string leak Since kobject_init_and_add takes a format string, make sure that the passed in name cannot be accidentally parsed. Signed-off-by: Kees Cook Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/video/fbdev/omap2/dss/display-sysfs.c b/drivers/video/fbdev/omap2/dss/display-sysfs.c index 12186557a9d4..6ad0991f8259 100644 --- a/drivers/video/fbdev/omap2/dss/display-sysfs.c +++ b/drivers/video/fbdev/omap2/dss/display-sysfs.c @@ -324,7 +324,7 @@ int display_init_sysfs(struct platform_device *pdev) for_each_dss_dev(dssdev) { r = kobject_init_and_add(&dssdev->kobj, &display_ktype, - &pdev->dev.kobj, dssdev->alias); + &pdev->dev.kobj, "%s", dssdev->alias); if (r) { DSSERR("failed to create sysfs files\n"); omap_dss_put_device(dssdev);