Skip to content

Commit

Permalink
ntb: avoid format string in dev_set_name
Browse files Browse the repository at this point in the history
Avoid any chance of format string expansion when calling dev_set_name.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
  • Loading branch information
Kees Cook authored and Jon Mason committed Aug 9, 2015
1 parent 30a4bb1 commit e15f940
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ntb/ntb.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ int ntb_register_device(struct ntb_dev *ntb)
ntb->dev.bus = &ntb_bus;
ntb->dev.parent = &ntb->pdev->dev;
ntb->dev.release = ntb_dev_release;
dev_set_name(&ntb->dev, pci_name(ntb->pdev));
dev_set_name(&ntb->dev, "%s", pci_name(ntb->pdev));

ntb->ctx = NULL;
ntb->ctx_ops = NULL;
Expand Down

0 comments on commit e15f940

Please sign in to comment.