Skip to content

Commit e15f940

Browse files
keesjonmason
authored andcommitted
ntb: avoid format string in dev_set_name
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>
1 parent 30a4bb1 commit e15f940

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ntb/ntb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ int ntb_register_device(struct ntb_dev *ntb)
114114
ntb->dev.bus = &ntb_bus;
115115
ntb->dev.parent = &ntb->pdev->dev;
116116
ntb->dev.release = ntb_dev_release;
117-
dev_set_name(&ntb->dev, pci_name(ntb->pdev));
117+
dev_set_name(&ntb->dev, "%s", pci_name(ntb->pdev));
118118

119119
ntb->ctx = NULL;
120120
ntb->ctx_ops = NULL;

0 commit comments

Comments
 (0)