summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device/init.c
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-11-19 13:40:48 +0100
committerDave Wallace <dwallacelf@gmail.com>2019-11-19 15:21:50 +0000
commitab9b9a5c0e3257136701cde6cdfdc66c35bf8f3d (patch)
tree2cdc7078e72dca5a7fdd37adbb939848f745ea15 /src/plugins/dpdk/device/init.c
parent91f90d0826e1789de2b2344686bd393115167e89 (diff)
dpdk: fix non-NULL terminated string
Type: fix Change-Id: Ic221cd4fcad89aece71239ed96152bf0311f3286 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device/init.c')
-rw-r--r--src/plugins/dpdk/device/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 25f9e952824..3b2eaa668ca 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -181,7 +181,7 @@ check_l3cache ()
u8 *p = NULL;
int level_cache = -1;
- p = format (p, "%s/%s/%s", sys_cache_dir, dp->d_name, "level");
+ p = format (p, "%s/%s/%s%c", sys_cache_dir, dp->d_name, "level", 0);
if ((err = clib_sysfs_read ((char *) p, "%d", &level_cache)))
clib_error_free (err);