From: Donald Sharp Date: Wed, 5 May 2021 11:48:55 +0000 (-0400) Subject: bgpd: Another call path with uninited data X-Git-Tag: base_8.0~44^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=60031a55f61ff5ff9d26b63c636ffbb5e1206356;p=matthieu%2Ffrr.git bgpd: Another call path with uninited data Prevent another call path that uses uninited data in bgp_pbr.c This was found through more clang sa runs. Signed-off-by: Donald Sharp --- diff --git a/bgpd/bgp_pbr.c b/bgpd/bgp_pbr.c index 8b27b39c46..01443c778f 100644 --- a/bgpd/bgp_pbr.c +++ b/bgpd/bgp_pbr.c @@ -2034,6 +2034,9 @@ static void bgp_pbr_icmp_action(struct bgp *bgp, struct bgp_path_info *path, return; if (bpf->protocol != IPPROTO_ICMP) return; + + memset(&srcp, 0, sizeof(srcp)); + memset(&dstp, 0, sizeof(dstp)); bpf->src_port = &srcp; bpf->dst_port = &dstp; /* parse icmp type and lookup appropriate icmp code