Skip to content

Commit

Permalink
fbdev: omap2: remove potential format string leak
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Tomi Valkeinen <[email protected]>
  • Loading branch information
kees authored and tomba committed Jun 12, 2015
1 parent 8dc0a56 commit 7e46cd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/fbdev/omap2/dss/display-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7e46cd7

Please sign in to comment.