From b0c2ec5e7c84241e0f5beb5fdf8a60cf111d5ffb Mon Sep 17 00:00:00 2001 From: Nathan Skrzypczak Date: Mon, 8 Mar 2021 09:37:43 +0100 Subject: cnat: Coverity fix Type: fix Change-Id: I004a49e59d8643599fc99ad6fa5848d3cf289b7a Signed-off-by: Nathan Skrzypczak --- src/plugins/cnat/cnat_snat_policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/cnat') diff --git a/src/plugins/cnat/cnat_snat_policy.c b/src/plugins/cnat/cnat_snat_policy.c index e2901631b28..d59156f34c8 100644 --- a/src/plugins/cnat/cnat_snat_policy.c +++ b/src/plugins/cnat/cnat_snat_policy.c @@ -91,7 +91,7 @@ cnat_snat_policy_add_del_if (u32 sw_if_index, u8 is_add, { cnat_snat_policy_main_t *cpm = &cnat_snat_policy_main; - if (table > ARRAY_LEN (cpm->interface_maps)) + if (table >= ARRAY_LEN (cpm->interface_maps)) return VNET_API_ERROR_INVALID_VALUE; clib_bitmap_t **map = &cpm->interface_maps[table]; -- cgit 1.2.3-korg