diff options
author | Benoît Ganne <bganne@cisco.com> | 2019-11-20 09:07:50 +0100 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2019-11-28 10:17:39 +0000 |
commit | b34331e8ab764ee181039d063e059efd42d43be2 (patch) | |
tree | 95db381646c1190f3e0225829f04b4435f249462 /src/vlib | |
parent | 48f8eb3dc335709ae2869e7d8f30a1214b28be96 (diff) |
vlib: pci: fix non-NULL terminated C-string
Type: fix
Change-Id: I6f25d9295b973ab7133071b6dc325ecd86386898
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 0b91bd6c52460c3bff9ae7b1c0405d258a016c32)
Diffstat (limited to 'src/vlib')
-rw-r--r-- | src/vlib/linux/pci.c | 4 |
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); |