projects
/
profile
/
ivi
/
kernel-x86-ivi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3defef4
)
usb: gadget: tcm_usb_gadget: stop format strings
author
Kees Cook
<keescook@chromium.org>
Tue, 11 Mar 2014 20:26:16 +0000
(13:26 -0700)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Tue, 6 May 2014 14:59:30 +0000
(07:59 -0700)
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/tcm_usb_gadget.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/tcm_usb_gadget.c
b/drivers/usb/gadget/tcm_usb_gadget.c
index
0f8aad7
..
460c266
100644
(file)
--- 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;
}