aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/p2pdma.c
diff options
context:
space:
mode:
authorKrzysztof Wilczyński <kw@linux.com>2021-06-03 00:01:08 +0000
committerBjorn Helgaas <bhelgaas@google.com>2021-06-03 17:14:36 -0500
commit316ae33051215f92c72fe13bc1bfc4e513a26700 (patch)
tree1cab88efef6cd3ebc148127417f091386836b790 /drivers/pci/p2pdma.c
parentPCI/sysfs: Fix dsm_label_utf16s_to_utf8s() buffer overrun (diff)
downloadlinux-dev-316ae33051215f92c72fe13bc1bfc4e513a26700.tar.xz
linux-dev-316ae33051215f92c72fe13bc1bfc4e513a26700.zip
PCI/sysfs: Rely on lengths from scnprintf(), dsm_label_utf16s_to_utf8s()
scnprintf() returns the number of bytes written into the buffer. Change dsm_label_utf16s_to_utf8s() to do the same. Rely on those values instead of using strlen() to compute the buffer length. No functional change intended. [bhelgaas: reorder patch in series, len++ to include newline added by dsm_label_utf16s_to_utf8s(), commit log] Link: https://lore.kernel.org/r/20210603000112.703037-3-kw@linux.com Signed-off-by: Krzysztof Wilczyński <kw@linux.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Diffstat (limited to 'drivers/pci/p2pdma.c')
0 files changed, 0 insertions, 0 deletions