diff options
author | Kees Cook <keescook@chromium.org> | 2014-03-11 13:26:16 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-17 16:08:27 -0700 |
commit | aba37fd975f0dd58e025c99c2a79b61b20190831 (patch) | |
tree | aa85fe3f785b0ec9a818834b5466b751a70fa8ce /drivers/usb/gadget/tcm_usb_gadget.c | |
parent | 48968f8d5f2234fb1768c55cf7d96d0b87446cd6 (diff) | |
download | op-kernel-dev-aba37fd975f0dd58e025c99c2a79b61b20190831.zip op-kernel-dev-aba37fd975f0dd58e025c99c2a79b61b20190831.tar.gz |
usb: gadget: tcm_usb_gadget: stop format strings
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>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/tcm_usb_gadget.c')
-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 0f8aad7..460c266 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; } |