fib: Uninitialised pad in the prefix (coverity warning) 18/25318/2
authorNeale Ranns <nranns@cisco.com>
Thu, 20 Feb 2020 13:10:47 +0000 (13:10 +0000)
committerDamjan Marion <dmarion@me.com>
Fri, 21 Feb 2020 09:55:19 +0000 (09:55 +0000)
Type: fix

Change-Id: Ia61d6fbf6e80977f83f1f6672e5e83b52ddeb0e5
Signed-off-by: Neale Ranns <nranns@cisco.com>
src/vnet/fib/fib_types.c

index 38f7926..dcb1c3a 100644 (file)
@@ -89,6 +89,7 @@ fib_prefix_from_ip46_addr (const ip46_address_t *addr,
     pfx->fp_len = ((ip46_address_is_ip4(addr) ?
                    32 : 128));
     pfx->fp_addr = *addr;
+    pfx->___fp___pad = 0;
 }
 
 void
@@ -100,6 +101,7 @@ fib_prefix_from_mpls_label (mpls_label_t label,
     pfx->fp_len = 21;
     pfx->fp_label = label;
     pfx->fp_eos = eos;
+    pfx->___fp___pad = 0;
 }
 
 void