mbox series

[0/2] Switch to using scnprintf() in the UHCI driver's debugging code

Message ID 20220312202834.11700-1-s.shtylyov@omp.ru (mailing list archive)
Headers show
Series Switch to using scnprintf() in the UHCI driver's debugging code | expand

Message

Sergey Shtylyov March 12, 2022, 8:28 p.m. UTC
Here are 2 patches against the 'usb-next' branch of Greg KH's 'usb.git' repo.
The UHCI driver's debugging code uses a lot of sprintf() calls with the large
buffers, leaving some space at the end of the buffers to handle the buffer
overflow.  Using scnprntf() calls instead eliminates the very possibility of
the buffer overflow...

Sergey Shtylyov (2):
  usb: host: uhci-debug: use scnprintf() instead of sprintf()
  usb: host: uhci: remove #define EXTRA_SPACE

 drivers/usb/host/uhci-debug.c | 263 ++++++++++++----------------------
 drivers/usb/host/uhci-hcd.c   |   2 +-
 drivers/usb/host/uhci-q.c     |   2 +-
 3 files changed, 93 insertions(+), 174 deletions(-)