]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: SA set labels/num_labels to NULL/0
authorStephen Worley <sworley@nvidia.com>
Fri, 9 Dec 2022 22:23:32 +0000 (17:23 -0500)
committerStephen Worley <sworley@nvidia.com>
Mon, 13 Feb 2023 23:12:05 +0000 (18:12 -0500)
Static Analysis caught a bug where we could be reading
garbage values for labels/num_lables. Fix that by
ensuring it's set to NULL/0 per loop of the mpath.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
bgpd/bgp_zebra.c

index c1b27688dd14f8f6b8e087db4b64180523d8502b..3a61989900f2dd4d58624e0e9729a386225942fd 100644 (file)
@@ -1404,6 +1404,8 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p,
        }
 
        for (; mpinfo; mpinfo = bgp_path_info_mpath_next(mpinfo)) {
+               labels = NULL;
+               num_labels = 0;
                uint32_t nh_weight;
                bool is_evpn;
                bool is_parent_evpn;