summaryrefslogtreecommitdiffstats
path: root/src/plugins/gbp/gbp_ext_itf.c
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2019-01-07 19:54:20 +0100
committerNeale Ranns <nranns@cisco.com>2019-01-09 06:10:08 +0000
commit5f4eb24287c02be6f694f6698472ef4978a5e300 (patch)
treee2c783676924b71c7662176728db0b0720797470 /src/plugins/gbp/gbp_ext_itf.c
parente3034cdc74f9fe153259a55c03846495d3f9f088 (diff)
gbp: Fix coverity warnings
Change-Id: Iea64d246008b298edeeae338d781b79362f42046 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/plugins/gbp/gbp_ext_itf.c')
-rw-r--r--src/plugins/gbp/gbp_ext_itf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/gbp/gbp_ext_itf.c b/src/plugins/gbp/gbp_ext_itf.c
index 57ff625d64a..16cdaa87b77 100644
--- a/src/plugins/gbp/gbp_ext_itf.c
+++ b/src/plugins/gbp/gbp_ext_itf.c
@@ -113,6 +113,9 @@ gbp_ext_itf_delete (u32 sw_if_index)
gbp_ext_itf_t *gx;
index_t gxi;
+ if (vec_len (gbp_ext_itf_db) <= sw_if_index)
+ return (VNET_API_ERROR_INVALID_SW_IF_INDEX);
+
gxi = gbp_ext_itf_db[sw_if_index];
if (INDEX_INVALID != gxi)