summaryrefslogtreecommitdiffstats
path: root/vpp-api-test
diff options
context:
space:
mode:
Diffstat (limited to 'vpp-api-test')
-rw-r--r--vpp-api-test/vat/api_format.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/vpp-api-test/vat/api_format.c b/vpp-api-test/vat/api_format.c
index 3c9fd273b84..75e1fb2fe4f 100644
--- a/vpp-api-test/vat/api_format.c
+++ b/vpp-api-test/vat/api_format.c
@@ -12969,7 +12969,7 @@ api_lisp_locator_dump (vat_main_t * vam)
return -99;
}
- if (vec_len (ls_name) > 63)
+ if (vec_len (ls_name) > 62)
{
errmsg ("error: locator set name too long!");
return -99;
@@ -12989,7 +12989,8 @@ api_lisp_locator_dump (vat_main_t * vam)
else
{
vec_add1 (ls_name, 0);
- strncpy ((char *) mp->ls_name, (char *) ls_name, sizeof (mp->ls_name));
+ strncpy ((char *) mp->ls_name, (char *) ls_name,
+ sizeof (mp->ls_name) - 1);
}
/* send it... */