]> git.baikalelectronics.ru Git - kernel.git/commit
usb: host: xhci: use snprintf() in xhci_decode_trb()
authorSergey Shtylyov <s.shtylyov@omp.ru>
Thu, 30 Jun 2022 12:46:45 +0000 (15:46 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:46 +0000 (14:23 +0200)
commit2d1660183adbb1c5cb8da902e946ca99a62f0bf3
tree1848fef2c96cd9317fe94bc404a351a435e6ec6d
parentceab4132881da26dd28c0e7d51ed9b555aaa0f5e
usb: host: xhci: use snprintf() in xhci_decode_trb()

[ Upstream commit 47bc2907ae585ef196448d9fd292893fd7a24535 ]

Commit c8af135cd196 ("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: c8af135cd196 ("xhci: fix unsafe memory usage in xhci tracing")
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20220630124645.1805902-2-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/host/xhci.h