From b34331e8ab764ee181039d063e059efd42d43be2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Ganne?= Date: Wed, 20 Nov 2019 09:07:50 +0100 Subject: [PATCH] vlib: pci: fix non-NULL terminated C-string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Type: fix Change-Id: I6f25d9295b973ab7133071b6dc325ecd86386898 Signed-off-by: BenoƮt Ganne (cherry picked from commit 0b91bd6c52460c3bff9ae7b1c0405d258a016c32) --- src/vlib/linux/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vlib/linux/pci.c b/src/vlib/linux/pci.c index 19c0c5499fc..d8cbf7a4163 100644 --- a/src/vlib/linux/pci.c +++ b/src/vlib/linux/pci.c @@ -738,8 +738,8 @@ add_device_uio (vlib_main_t * vm, linux_pci_device_t * p, goto error; } - s = format (0, "%s/%U/uio", sysfs_pci_dev_path, - format_vlib_pci_addr, &di->addr); + s = format (0, "%s/%U/uio%c", sysfs_pci_dev_path, + format_vlib_pci_addr, &di->addr, 0); foreach_directory_file ((char *) s, scan_uio_dir, p, /* scan_dirs */ 1); vec_reset_length (s);