From 60031a55f61ff5ff9d26b63c636ffbb5e1206356 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 5 May 2021 07:48:55 -0400 Subject: [PATCH] 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 --- bgpd/bgp_pbr.c | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.39.5