From ab9b9a5c0e3257136701cde6cdfdc66c35bf8f3d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Beno=C3=AEt=20Ganne?= Date: Tue, 19 Nov 2019 13:40:48 +0100 Subject: [PATCH] dpdk: fix non-NULL terminated string MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Type: fix Change-Id: Ic221cd4fcad89aece71239ed96152bf0311f3286 Signed-off-by: Benoît Ganne --- src/plugins/dpdk/device/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.16.6