From 95f473e0d29f4ec39e66aea296b4364bcf34b4ee Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Fri, 8 Oct 2021 14:51:15 +0300 Subject: [PATCH] bgpd: don't return pointer to a local variable CID 1507651. Signed-off-by: Igor Ryzhov --- bgpd/bgp_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_table.c b/bgpd/bgp_table.c index 376172a6f9..4ed8c7c59b 100644 --- a/bgpd/bgp_table.c +++ b/bgpd/bgp_table.c @@ -88,7 +88,7 @@ struct bgp_dest *bgp_dest_lock_node(struct bgp_dest *dest) const char *bgp_dest_get_prefix_str(struct bgp_dest *dest) { const struct prefix *p = NULL; - char str[PREFIX_STRLEN] = {0}; + static char str[PREFIX_STRLEN] = {0}; p = bgp_dest_get_prefix(dest); if (p) -- 2.39.5