aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-11-20 09:07:50 +0100
committerDamjan Marion <dmarion@me.com>2019-11-20 17:36:45 +0000
commit0b91bd6c52460c3bff9ae7b1c0405d258a016c32 (patch)
treeb580a422e8bc7d5854a8a6b430bac02a44b48ce0 /src/vlib
parent99eefc2cfee4f71e1aaad1d420e6d9335072eb2c (diff)
vlib: pci: fix non-NULL terminated C-string
Type: fix Change-Id: I6f25d9295b973ab7133071b6dc325ecd86386898 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/linux/pci.c4
1 files 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);