linux/drivers/usb
Lee Jones 0466e7e693 usb: gadget: configfs: Replace snprintf() with the safer scnprintf() variant
There is a general misunderstanding amongst engineers that {v}snprintf()
returns the length of the data *actually* encoded into the destination
array.  However, as per the C99 standard {v}snprintf() really returns
the length of the data that *would have been* written if there were
enough space for it.  This misunderstanding has led to buffer-overruns
in the past.  It's generally considered safer to use the {v}scnprintf()
variants in their place (or even sprintf() in simple cases).  So let's
do that.

Link: https://lwn.net/Articles/69419/
Link: https://github.com/KSPP/linux/issues/105
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20231213164246.1021885-2-lee@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-15 13:55:29 +01:00
..
atm usb: atm: Remove snprintf() from sysfs call-backs and replace with sysfs_emit() 2023-12-04 22:25:16 +09:00
c67x00 USB: c67x00: Remove unused declaration c67x00_hcd_msg_received() 2023-10-02 16:42:33 +02:00
cdns3 usb: cdns3: starfive: don't misuse /** comment 2023-12-11 09:08:12 +01:00
chipidea usb: chipidea: Remove usage of the deprecated ida_simple_xx() API 2023-12-15 13:53:33 +01:00
class usb: cdc-acm: return correct error code on unsupported break 2023-12-15 13:52:47 +01:00
common Merge 6.5-rc6 into usb-next 2023-08-14 22:22:31 +02:00
core usb: core: Fix crash w/ usb_choose_configuration() if no driver 2023-12-15 13:54:09 +01:00
dwc2 USB: dwc2: write HCINT with INTMASK applied 2023-11-21 15:30:27 +01:00
dwc3 usb: dwc3: xilinx: improve error handling for PM APIs 2023-12-15 13:52:29 +01:00
early usb: early: xhci-dbc: Use memcpy_and_pad() 2023-01-31 10:40:54 +01:00
fotg210 usb: fotg210-udc: fix function kernel-doc comments 2023-12-11 09:08:42 +01:00
gadget usb: gadget: configfs: Replace snprintf() with the safer scnprintf() variant 2023-12-15 13:55:29 +01:00
host Merge 6.7-rc5 into usb-next 2023-12-11 08:44:28 +01:00
image scsi: usb: uas: Declare two host templates and host template pointers const 2023-03-24 19:20:00 -04:00
isp1760 usb: isp1760: Convert to platform remove callback returning void 2023-05-28 12:38:01 +01:00
misc usb: misc: onboard_usb_hub: Add support for Cypress CY7C6563x 2023-11-27 19:13:22 +00:00
mon usbmon: Use list_for_each_entry() helper 2023-10-02 16:19:01 +02:00
mtu3 usb: mtu3: Convert to platform remove callback returning void 2023-10-21 12:49:08 +02:00
musb Merge 6.6-rc6 into usb-next 2023-10-16 17:36:12 +02:00
phy usb: phy: generic: add suspend support for regulator 2023-11-23 12:32:43 +00:00
renesas_usbhs usb: Explicitly include correct DT includes 2023-07-25 18:20:02 +02:00
roles USB: roles: make role_class a static const structure 2023-06-20 16:20:40 +02:00
serial USB: serial: option: add Luat Air72*U series products 2023-11-23 18:39:30 +01:00
storage usb: storage: set 1.50 as the lower bcdDevice for older "Super Top" compatibility 2023-10-28 12:23:41 +02:00
typec usb: typec: mux: add Qualcomm WCD939X USB SubSystem Altmode Mux driver 2023-12-15 13:54:13 +01:00
usbip USB: usbip: vudc: Convert to platform remove callback returning void 2023-11-22 12:02:53 +00:00
Kconfig usb: pci-quirks: handle HAS_IOPORT dependency for AMD quirk 2023-10-02 16:19:12 +02:00
Makefile usb: host: u132-hcd: Delete driver 2023-03-21 14:06:11 +01:00
usb-skeleton.c usb: add usb_set_intfdata() documentation 2022-11-29 08:56:09 +01:00