summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/udc/dummy_hcd.c
diff options
context:
space:
mode:
authorJaejoong Kim <climbbb.kim@gmail.com>2018-02-27 11:04:22 +0900
committerFelipe Balbi <felipe.balbi@linux.intel.com>2018-03-13 10:47:51 +0200
commit3589cce2b92ba8a11372f2c707adc9eb623efa67 (patch)
tree0856b907e21337a2d2b300dca55f8e311d8f9497 /drivers/usb/gadget/udc/dummy_hcd.c
parentdaaecc6541d014dca073473ec8a4120c0babbeb4 (diff)
downloadblackbird-obmc-linux-3589cce2b92ba8a11372f2c707adc9eb623efa67.tar.gz
blackbird-obmc-linux-3589cce2b92ba8a11372f2c707adc9eb623efa67.zip
usb: gadget: udc: Use scnprintf() instead of snprintf()
The show() method should use scnprintf() not snprintf() because snprintf() may returns a value that exceeds its second argument. Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget/udc/dummy_hcd.c')
-rw-r--r--drivers/usb/gadget/udc/dummy_hcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c
index e744d4b7bfed..baf72f95f0f1 100644
--- a/drivers/usb/gadget/udc/dummy_hcd.c
+++ b/drivers/usb/gadget/udc/dummy_hcd.c
@@ -2366,7 +2366,7 @@ static inline ssize_t show_urb(char *buf, size_t size, struct urb *urb)
{
int ep = usb_pipeendpoint(urb->pipe);
- return snprintf(buf, size,
+ return scnprintf(buf, size,
"urb/%p %s ep%d%s%s len %d/%d\n",
urb,
({ char *s;
OpenPOWER on IntegriCloud