vlib: pci: fix non-NULL terminated C-string
Type: fix
Change-Id: I6f25d9295b973ab7133071b6dc325ecd86386898
Signed-off-by: Benoît Ganne <bganne@cisco.com>
diff --git a/src/vlib/linux/pci.c b/src/vlib/linux/pci.c
index 19c0c54..d8cbf7a 100644
--- a/src/vlib/linux/pci.c
+++ b/src/vlib/linux/pci.c
@@ -738,8 +738,8 @@
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);