From: Philippe Guibert Date: Tue, 16 Jun 2020 06:42:10 +0000 (+0200) Subject: bgpd: remove sprintf() usage on flowspec X-Git-Tag: base_7.5~46^2~3 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=a973d4c440b36bcd53254c633d65be84b83790a2;p=mirror%2Ffrr.git bgpd: remove sprintf() usage on flowspec flowspec is being removed from remaining sprintf() calls. Signed-off-by: Philippe Guibert --- diff --git a/bgpd/bgp_pbr.c b/bgpd/bgp_pbr.c index 32b57aa96d..0c36f138f1 100644 --- a/bgpd/bgp_pbr.c +++ b/bgpd/bgp_pbr.c @@ -2474,7 +2474,7 @@ static void bgp_pbr_policyroute_add_to_zebra_unit(struct bgp *bgp, if (bpm->unique == 0) { bpm->unique = ++bgp_pbr_match_counter_unique; /* 0 value is forbidden */ - sprintf(bpm->ipset_name, "match%p", bpm); + snprintf(bpm->ipset_name, sizeof(bpm->ipset_name), "match%p", bpm); bpm->entry_hash = hash_create_size(8, bgp_pbr_match_entry_hash_key, bgp_pbr_match_entry_hash_equal,