aboutsummaryrefslogtreecommitdiffstats
path: root/vpp
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2016-09-20 12:37:09 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2016-09-20 14:34:20 +0000
commitf07fb71b6276429bd81b5ae3669c8f33d38df1fa (patch)
tree3b1bd18320329da15d8759ad3ea3ded28acea659 /vpp
parent560e809b4459f508b756a19493de746e0892389e (diff)
VPP-189: fix coverity issue in api_format.c
Change-Id: Ib16fd69abe93c1afb2ee1d38144763f57888585c Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'vpp')
-rw-r--r--vpp/vpp-api/api.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vpp/vpp-api/api.c b/vpp/vpp-api/api.c
index 62dd000f..66309606 100644
--- a/vpp/vpp-api/api.c
+++ b/vpp/vpp-api/api.c
@@ -5716,6 +5716,8 @@ vl_api_lisp_locator_dump_t_handler (vl_api_lisp_locator_dump_t * mp)
ls_index = htonl (mp->ls_index);
else
{
+ /* make sure we get a proper C-string */
+ mp->ls_name[sizeof (mp->ls_name) - 1] = 0;
ls_name = format (0, "%s", mp->ls_name);
p = hash_get_mem (lcm->locator_set_index_by_name, ls_name);
if (!p)