summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-10-31 19:21:31 +0100
committerFlorin Coras <florin.coras@gmail.com>2021-11-02 04:45:58 +0000
commit60706a2869919d32636e0bea8348d4175a905295 (patch)
tree8380f54e0d538efb05f6ae05d5f77dcf1d5a4969 /src/vnet
parentb850932451a5c35951d6aa89d942e8399a7ce8dc (diff)
l2: fix outside array bounds errors
Reported by gcc-11... Type: fix Change-Id: Ia00001a6334722a6ae9cc771e6861c1f709df286 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/l2/l2_fib.c2
-rw-r--r--src/vnet/l2/l2_test.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/l2/l2_fib.c b/src/vnet/l2/l2_fib.c
index d1ee82273b1..d9d6710fd15 100644
--- a/src/vnet/l2/l2_fib.c
+++ b/src/vnet/l2/l2_fib.c
@@ -606,7 +606,7 @@ static clib_error_t *
l2fib_test_command_fn (vlib_main_t * vm,
unformat_input_t * input, vlib_cli_command_t * cmd)
{
- u8 mac[6], save_mac[6];
+ u8 mac[8], save_mac[6];
u32 bd_index = 0;
u32 sw_if_index = 8;
u32 is_add = 0;
diff --git a/src/vnet/l2/l2_test.c b/src/vnet/l2/l2_test.c
index ba8802da1b6..c7cd1d255c1 100644
--- a/src/vnet/l2/l2_test.c
+++ b/src/vnet/l2/l2_test.c
@@ -188,7 +188,7 @@ api_l2fib_add_del (vat_main_t *vam)
unformat_input_t *i = vam->input;
vl_api_l2fib_add_del_t *mp;
f64 timeout;
- u8 mac[6] = { 0 };
+ u8 mac[8] = { 0 };
u8 mac_set = 0;
u32 bd_id;
u8 bd_id_set = 0;