summaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-cp/one_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/lisp-cp/one_api.c')
-rw-r--r--src/vnet/lisp-cp/one_api.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/lisp-cp/one_api.c b/src/vnet/lisp-cp/one_api.c
index c9b5dca3aff..33b3a47a352 100644
--- a/src/vnet/lisp-cp/one_api.c
+++ b/src/vnet/lisp-cp/one_api.c
@@ -202,6 +202,7 @@ vl_api_one_add_del_locator_set_t_handler (vl_api_one_add_del_locator_set_t *
memset (a, 0, sizeof (a[0]));
+ mp->locator_set_name[sizeof (mp->locator_set_name) - 1] = 0;
locator_name = format (0, "%s", mp->locator_set_name);
vec_terminate_c_string (locator_name);
@@ -257,6 +258,7 @@ vl_api_one_add_del_locator_t_handler (vl_api_one_add_del_locator_t * mp)
locator.local = 1;
vec_add1 (locators, locator);
+ mp->locator_set_name[sizeof (mp->locator_set_name) - 1] = 0;
locator_name = format (0, "%s", mp->locator_set_name);
vec_terminate_c_string (locator_name);
@@ -344,6 +346,7 @@ vl_api_one_add_del_local_eid_t_handler (vl_api_one_add_del_local_eid_t * mp)
goto out;
}
+ mp->locator_set_name[sizeof (mp->locator_set_name) - 1] = 0;
name = format (0, "%s", mp->locator_set_name);
vec_terminate_c_string (name);
p = hash_get_mem (lcm->locator_set_index_by_name, name);
@@ -485,6 +488,7 @@ vl_api_one_nsh_set_locator_set_t_handler (vl_api_one_nsh_set_locator_set_t
int rv = 0;
u8 *ls_name = 0;
+ mp->ls_name[sizeof (mp->ls_name) - 1] = 0;
ls_name = format (0, "%s", mp->ls_name);
vec_terminate_c_string (ls_name);
rv = vnet_lisp_nsh_set_locator_set (ls_name, mp->is_add);
@@ -501,6 +505,7 @@ vl_api_one_pitr_set_locator_set_t_handler (vl_api_one_pitr_set_locator_set_t
int rv = 0;
u8 *ls_name = 0;
+ mp->ls_name[sizeof (mp->ls_name) - 1] = 0;
ls_name = format (0, "%s", mp->ls_name);
vec_terminate_c_string (ls_name);
rv = vnet_lisp_pitr_set_locator_set (ls_name, mp->is_add);
@@ -589,6 +594,7 @@ static void
u8 *locator_set_name = NULL;
vnet_lisp_add_del_mreq_itr_rloc_args_t _a, *a = &_a;
+ mp->locator_set_name[sizeof (mp->locator_set_name) - 1] = 0;
locator_set_name = format (0, "%s", mp->locator_set_name);
vec_terminate_c_string (locator_set_name);