summaryrefslogtreecommitdiffstats
path: root/vpp-api-test
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2016-09-21 16:38:19 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2016-09-22 22:38:43 +0000
commit042d212cd887b53dfd89ec58975ada0dc2ca8f44 (patch)
tree332aa04a4e98bd534ef0a08651c516c87ef2dd8a /vpp-api-test
parent37623706014a591186585613e6de19686abe6104 (diff)
VPP-189: fix coverity issue in api_format.c
Change-Id: I8cf3bb27bc699be3b8de781ea84db4c7fb3c7553 Signed-off-by: Florin Coras <fcoras@cisco.com>
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... */