summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-08-29 18:16:14 +0200
committerDave Wallace <dwallacelf@gmail.com>2019-08-29 18:02:24 +0000
commit18fff7477b40b7764f2e3bd0f91279db39acb759 (patch)
treebd1ff60c8fe50e7cdf828c7893d3635080a6382c
parent977c1dec69bab72dcae0c62578be7fc0892e897b (diff)
stats: null-terminate default socket name
Type: fix Fixes: d991a798ff Change-Id: I1920a40d7bbb01593676d9d8564158fdba9452bb Signed-off-by: Benoît Ganne <bganne@cisco.com>
-rw-r--r--src/vpp/stats/stat_segment.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vpp/stats/stat_segment.c b/src/vpp/stats/stat_segment.c
index 303d7040c94..bf970506d59 100644
--- a/src/vpp/stats/stat_segment.c
+++ b/src/vpp/stats/stat_segment.c
@@ -715,8 +715,8 @@ statseg_init (vlib_main_t * vm)
/* set default socket file name when statseg config stanza is empty. */
if (!vec_len (sm->socket_name))
- sm->socket_name = format (0, "%s/%s", vlib_unix_get_runtime_dir (),
- STAT_SEGMENT_SOCKET_FILENAME);
+ sm->socket_name = format (0, "%s/%s%c", vlib_unix_get_runtime_dir (),
+ STAT_SEGMENT_SOCKET_FILENAME, 0);
return stats_segment_socket_init ();
}