From d2acfbc8f8beaaa544d70163da1622a72a863084 Mon Sep 17 00:00:00 2001 From: Andrew Yourtchenko Date: Tue, 23 Aug 2022 17:29:00 +0000 Subject: fib: fix coverity 249175 Add an assert to express the constraint to coverity without incurring the overhead in release builds. Type: fix Signed-off-by: Andrew Yourtchenko Change-Id: I2c22f8b2565c645d95c9c0be37381060e151420f --- src/vnet/fib/fib_entry_src.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vnet/fib/fib_entry_src.c b/src/vnet/fib/fib_entry_src.c index c0275e898bd..39e719e6a7a 100644 --- a/src/vnet/fib/fib_entry_src.c +++ b/src/vnet/fib/fib_entry_src.c @@ -46,6 +46,7 @@ fib_entry_src_get_vft (const fib_entry_src_t *esrc) return (&fib_entry_src_bh_vft[FIB_SOURCE_BH_INTERPOSE]); } + ASSERT(bh < FIB_SOURCE_BH_MAX); return (&fib_entry_src_bh_vft[bh]); } -- cgit 1.2.3-korg