]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: remove sprintf() usage on flowspec
authorPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 16 Jun 2020 06:42:10 +0000 (08:42 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Fri, 21 Aug 2020 11:37:08 +0000 (13:37 +0200)
flowspec is being removed from remaining sprintf() calls.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/bgp_pbr.c

index 32b57aa96d6e6527781e47a02cb50d940ccc30e0..0c36f138f1ebe1b2e9d1a6d5adffb1a1d86a7a89 100644 (file)
@@ -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,