l2: fix l2input_feat_names overflow

Type: fix

Change-Id: I59549b3aab5a0ccfe7db02757f78528e028121a5
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit 70ef0faea9)
This commit is contained in:
Benoît Ganne
2019-12-16 15:51:38 +01:00
committed by Andrew Yourtchenko
parent f7b581260f
commit 6051aa4924

View File

@@ -83,7 +83,7 @@ format_l2_input_features (u8 * s, va_list * args)
feature_bitmap &= ~L2INPUT_FEAT_DROP; /* Not a feature */
int i;
for (i = L2INPUT_N_FEAT; i >= 0; i--)
for (i = L2INPUT_N_FEAT - 1; i >= 0; i--)
{
if (feature_bitmap & (1 << i))
{