]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #8035 from qlyoung/remove-more-sprintf
authorMark Stapp <mjs@voltanet.io>
Tue, 23 Feb 2021 20:55:02 +0000 (15:55 -0500)
committerGitHub <noreply@github.com>
Tue, 23 Feb 2021 20:55:02 +0000 (15:55 -0500)
*: remove more sprintf()

1  2 
bgpd/bgp_route.c
lib/vty.c
ospf6d/ospf6_abr.c
ospf6d/ospf6_intra.c
zebra/rt_netlink.c

Simple merge
diff --cc lib/vty.c
Simple merge
Simple merge
index 5394ba97868cdbe68d77df9cf977b64f0c9de863,1a81d50b6814e541247b7e00c8c9dd2698ae50e2..2cffc3a3979b89ae8e8872cc95d09d805b31f44d
@@@ -898,11 -898,12 +899,12 @@@ static char *ospf6_intra_prefix_lsa_get
                                       OSPF6_PREFIX_SPACE(
                                               prefix->prefix_length));
                                inet_ntop(AF_INET6, &in6, buf, buflen);
-                               sprintf(&buf[strlen(buf)], "/%d",
-                                       prefix->prefix_length);
+                               snprintf(tbuf, sizeof(tbuf), "/%d",
+                                        prefix->prefix_length);
+                               strlcat(buf, tbuf, buflen);
                                return (buf);
                        }
 -              } while (current <= end);
 +              }
        }
        return NULL;
  }
Simple merge