aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-04-26 11:08:45 +0200
committerOle Trøan <otroan@employees.org>2019-04-30 16:12:34 +0000
commita878014c6e0c9d9d5677fe9feeb8a9effb894e3d (patch)
tree159528a18e799d94153ce85c8e5aea9105328734 /src
parent052bda38c34fa73f8d0ad86615b777a0dd7f34d0 (diff)
stats: fix non null terminated string
Change-Id: I08e490d9e955072eff20d0141598157d995bcb56 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vpp/stats/stat_segment.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vpp/stats/stat_segment.c b/src/vpp/stats/stat_segment.c
index 2cf82b97f18..2338a2564bf 100644
--- a/src/vpp/stats/stat_segment.c
+++ b/src/vpp/stats/stat_segment.c
@@ -703,6 +703,11 @@ statseg_config (vlib_main_t * vm, unformat_input_t * input)
/* set default socket file name when statseg config stanza is empty. */
sm->socket_name = format (0, "%s", STAT_SEGMENT_SOCKET_FILE);
+ /*
+ * NULL-terminate socket name string
+ * clib_socket_init()->socket_config() use C str*
+ */
+ vec_add1 (sm->socket_name, 0);
while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
{