summaryrefslogtreecommitdiffstats
path: root/bgpd/rfapi
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2023-05-20 09:03:10 +0200
committerDonatas Abraitis <donatas@opensourcerouting.org>2023-05-20 09:03:10 +0200
commite0b1c8ccdf6821e4397edbba9e82dd6010ea2f8f (patch)
tree04013cbe8f13818aa9f265fd067b46fe5d660b6d /bgpd/rfapi
parentMerge pull request #13559 from opensourcerouting/fix/ignore_decoding_chars (diff)
downloadfrr-e0b1c8ccdf6821e4397edbba9e82dd6010ea2f8f.tar.xz
frr-e0b1c8ccdf6821e4397edbba9e82dd6010ea2f8f.zip
bgpd: Initialize pfx_buf to zeros before using in bgp_path_info_cmp()
This can lead into some garbage outputs, that can't be decoded in utf-8 or so. This was catched when testing 76b246aa1f779e17ce6845c6ab0c292497b0008f. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'bgpd/rfapi')
-rw-r--r--bgpd/rfapi/rfapi_import.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/rfapi/rfapi_import.c b/bgpd/rfapi/rfapi_import.c
index 4b8e07a9c..27f7c88d7 100644
--- a/bgpd/rfapi/rfapi_import.c
+++ b/bgpd/rfapi/rfapi_import.c
@@ -1939,7 +1939,7 @@ static void rfapiBgpInfoAttachSorted(struct agg_node *rn,
struct bgp *bgp;
struct bgp_path_info *prev;
struct bgp_path_info *next;
- char pfx_buf[PREFIX2STR_BUFFER];
+ char pfx_buf[PREFIX2STR_BUFFER] = {};
bgp = bgp_get_default(); /* assume 1 instance for now */