summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2015-06-08 15:30:53 -0700
committerTomi Valkeinen <tomi.valkeinen@ti.com>2015-06-12 12:37:45 +0300
commit7e46cd705fd8aa458590ad38cf896b5aff525334 (patch)
tree13b2e1fe2d854d4b4c368d5d46fea0d684e6fb6e /drivers/video
parent8dc0a56529f5d60bbb927049d48245b1a7989bf8 (diff)
downloadop-kernel-dev-7e46cd705fd8aa458590ad38cf896b5aff525334.zip
op-kernel-dev-7e46cd705fd8aa458590ad38cf896b5aff525334.tar.gz
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 <keescook@chromium.org> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/omap2/dss/display-sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/omap2/dss/display-sysfs.c b/drivers/video/fbdev/omap2/dss/display-sysfs.c
index 1218655..6ad0991 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);
OpenPOWER on IntegriCloud