vppinfra: make _vec_len() read-only
Use of _vec_len() to set vector length breaks address sanitizer. Users should use vec_set_len(), vec_inc_len(), vec_dec_len () instead. Type: improvement Change-Id: I441ae948771eb21c23a61f3ff9163bdad74a2cb8 Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:

committed by
Damjan Marion

parent
a2b358b1fa
commit
8bea589cfe
@@ -346,7 +346,7 @@ nsh_add_del_map (nsh_add_del_map_args_t * a, u32 * map_indexp)
|
||||
{
|
||||
nsh_hw_if = nm->free_nsh_tunnel_hw_if_indices
|
||||
[vec_len (nm->free_nsh_tunnel_hw_if_indices) - 1];
|
||||
_vec_len (nm->free_nsh_tunnel_hw_if_indices) -= 1;
|
||||
vec_dec_len (nm->free_nsh_tunnel_hw_if_indices, 1);
|
||||
|
||||
hi = vnet_get_hw_interface (vnm, nsh_hw_if);
|
||||
hi->dev_instance = map_index;
|
||||
|
Reference in New Issue
Block a user