diff options
author | Kees Cook <keescook@chromium.org> | 2014-03-12 00:26:16 +0400 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-05-15 11:55:21 +0400 |
commit | 34c35bea71a94296342957750b8703cd80811ee9 (patch) | |
tree | aae1802f93ffaa7635c15e0c43ce9801668356c5 /drivers/usb/gadget | |
parent | 8e7f2dc649bb6bb379ce8428c1bcfede59adc41c (diff) | |
download | linux-34c35bea71a94296342957750b8703cd80811ee9.tar.xz |
usb: gadget: tcm_usb_gadget: stop format strings
commit aba37fd975f0dd58e025c99c2a79b61b20190831 upstream.
This makes sure that the name coming out of configfs cannot be used
accidentally as a format string.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/tcm_usb_gadget.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/tcm_usb_gadget.c b/drivers/usb/gadget/tcm_usb_gadget.c index 0ff33396eef3..d9e15e85258d 100644 --- a/drivers/usb/gadget/tcm_usb_gadget.c +++ b/drivers/usb/gadget/tcm_usb_gadget.c @@ -1613,7 +1613,7 @@ static struct se_wwn *usbg_make_tport( return ERR_PTR(-ENOMEM); } tport->tport_wwpn = wwpn; - snprintf(tport->tport_name, sizeof(tport->tport_name), wnn_name); + snprintf(tport->tport_name, sizeof(tport->tport_name), "%s", wnn_name); return &tport->tport_wwn; } |