summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2020-07-17 11:42:07 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-18 19:47:21 +0000
commit0e67a25052dde565e5a6a30e1fb37bba770074b6 (patch)
tree4f83e3baba0b07f6b8e7100289b37074ee45a5eb /src
parent7e9f66ec40093b7199841e0ec1b7fdade6ea1471 (diff)
lacp: fix vector overflow
Type: fix Change-Id: I8f776ce10ee8c29689db5ceef70df42dfb6b747c Signed-off-by: Benoît Ganne <bganne@cisco.com> (cherry picked from commit c72995dd79500dd5791e71fd3edeae527c257351)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lacp/cli.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/lacp/cli.c b/src/plugins/lacp/cli.c
index 36a6f9bfbdf..fee1be19463 100644
--- a/src/plugins/lacp/cli.c
+++ b/src/plugins/lacp/cli.c
@@ -38,12 +38,12 @@ lacp_dump_ifs (lacp_interface_details_t ** out_lacpifs)
hi = vnet_get_hw_interface (vnm, sif->hw_if_index);
clib_memcpy(lacpif->interface_name, hi->name,
MIN (ARRAY_LEN (lacpif->interface_name) - 1,
- strlen ((const char *) hi->name)));
+ vec_len (hi->name)));
bif = bond_get_master_by_dev_instance (sif->bif_dev_instance);
hi = vnet_get_hw_interface (vnm, bif->hw_if_index);
clib_memcpy(lacpif->bond_interface_name, hi->name,
MIN (ARRAY_LEN (lacpif->bond_interface_name) - 1,
- strlen ((const char *) hi->name)));
+ vec_len (hi->name)));
clib_memcpy (lacpif->actor_system, sif->actor.system, 6);
lacpif->actor_system_priority = sif->actor.system_priority;
lacpif->actor_key = sif->actor.key;