xhci feature for usb-next
Subsystems (2)
cover xhci feature for usb-next
Hi Greg
A very small change that was sitting in my for-usb-next branch for a while.
Thanks
Mathias
Sergey Shtylyov (1):
usb: host: xhci: use snprintf() in xhci_decode_trb()
drivers/usb/host/xhci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.25.1
PATCH 1/1 usb: host: xhci: use snprintf() in xhci_decode_trb()
From: Sergey Shtylyov <[email protected]>
Commit cbf286e8ef83 ("xhci: fix unsafe memory usage in xhci tracing") apparently missed one sprintf() call in xhci_decode_trb() -- replace it with the snprintf() call as well...
Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool.
Fixes cbf286e8ef83 ("xhci: fix unsafe memory usage in xhci tracing")
Signed-off-by Sergey Shtylyov <[email protected]>
Signed-off-by Mathias Nyman <[email protected]>
--- drivers/usb/host/xhci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/xhci.h +1 -1
@@ -2417,7 +2417,7 @@ static inline const char *xhci_decode_trb(char *str, size_t size, field3 & TRB_CYCLE ? 'C' : 'c');break ;case TRB_STOP_RING : - sprintf(str, + snprintf(str, size, "%s: slot %d sp %d ep %d flags %c", xhci_trb_type_string(type), TRB_TO_SLOT_ID(field3),
Signature · 1 line
2.25.1