summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-06-21 07:33:12 -0400
committerFlorin Coras <florin.coras@gmail.com>2018-06-21 14:34:55 +0000
commit56ba844d6a8b8f58b18fe51bf22707b0c37d3a87 (patch)
tree1a65aa615f54eefe068de815a551eec6f6343faa /src/plugins
parent4df3871a98e4f06c23e8466eef303adcd1c83953 (diff)
Null terminate name string
Change-Id: If7bcc6ae3358b5e39bf76481ee58f4dbaa53d895 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/mactime/mactime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/mactime/mactime.c b/src/plugins/mactime/mactime.c
index 80d1b1b3e26..82bcfae06fe 100644
--- a/src/plugins/mactime/mactime.c
+++ b/src/plugins/mactime/mactime.c
@@ -218,7 +218,7 @@ static void vl_api_mactime_add_del_range_t_handler
vlib_validate_simple_counter (&mm->drop_counters, dp - mm->devices);
vlib_zero_simple_counter (&mm->drop_counters, dp - mm->devices);
mp->device_name[ARRAY_LEN (mp->device_name) - 1] = 0;
- dp->device_name = format (0, "%s", mp->device_name);
+ dp->device_name = format (0, "%s%c", mp->device_name, 0);
memcpy (dp->mac_address, mp->mac_address, sizeof (mp->mac_address));
for (i = 0; i < clib_net_to_host_u32 (mp->count); i++)
{