From e46ea1d0c5cffcf721d150df86705145ec633e33 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Tue, 26 Oct 2021 16:23:11 +0200 Subject: fib: fix coverity warning/don't dereference NULL fib_sas6_get is called with NULL dst explicitly so add a NULL check to avoid a NULL dereference. Type: fix Signed-off-by: Klement Sekera Change-Id: I8ebcba98832f374991f5442c1b83a4b6e64771d0 --- src/vnet/fib/fib_sas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vnet/fib') diff --git a/src/vnet/fib/fib_sas.c b/src/vnet/fib/fib_sas.c index 8abac8672fd..c9d469379f1 100644 --- a/src/vnet/fib/fib_sas.c +++ b/src/vnet/fib/fib_sas.c @@ -112,7 +112,7 @@ fib_sas6_get (u32 sw_if_index, /* * if the dst is v6 and link local, use the source link local */ - if (ip6_address_is_link_local_unicast (dst)) + if (dst && ip6_address_is_link_local_unicast (dst)) { const ip6_address_t *ll = ip6_get_link_local_address (sw_if_index); if (NULL == ll) -- cgit 1.2.3-korg