summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-11-19 13:40:48 +0100
committerDave Barach <openvpp@barachs.net>2019-12-01 12:54:54 +0000
commitfe5c0a9db7851148def052b445018aa95b2915d9 (patch)
treed33f9db020ba7dd5ddf7febc64868e97c7de9abe /src
parentecb1634fa08a9f5235539348923511e61f17c724 (diff)
dpdk: fix non-NULL terminated string
Type: fix Change-Id: Ic221cd4fcad89aece71239ed96152bf0311f3286 Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit ab9b9a5c0e3257136701cde6cdfdc66c35bf8f3d)
Diffstat (limited to 'src')
-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 91f74a66172..b5f0ec7e563 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);