]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: Use scnprintf() instead of sprintf()
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 19 Dec 2025 17:40:32 +0000 (19:40 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 27 Jan 2026 22:36:53 +0000 (16:36 -0600)
commit3d71bc79eee1d436547edc81f50fcc0d607b356b
tree2dc541ff767a3ec20f9145f22a960ffd828c2a8b
parent08b3af830a35b66e0d40975dbf02feacc5d2aaa2
PCI: Use scnprintf() instead of sprintf()

Using sprintf() is deprecated as it does not do proper size checks.  While
the code in pci_scan_bridge_extend() is safe with respect to overwriting
the destination buffer, use scnprintf() to not promote use of a deprecated
sprint() (and allow eventually removing it from the kernel).

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20251219174036.16738-20-ilpo.jarvinen@linux.intel.com
drivers/pci/probe.c