diff options
author | Quentin Young <qlyoung@qlyoung.net> | 2021-02-08 04:39:42 +0100 |
---|---|---|
committer | Quentin Young <qlyoung@nvidia.com> | 2021-02-09 21:40:40 +0100 |
commit | 7533cad751eaeabe5626cad636aefa8bf50d7409 (patch) | |
tree | 866b7345bfbef16c3ae473aa997929598b61d45a /ospf6d/ospf6_abr.c | |
parent | Merge pull request #7937 from pjdruddy/topotest-evpn-svi-advertise (diff) | |
download | frr-7533cad751eaeabe5626cad636aefa8bf50d7409.tar.xz frr-7533cad751eaeabe5626cad636aefa8bf50d7409.zip |
*: remove more sprintf()
Should be just a couple non-development, non-test occurrences of this
function left now.
Signed-off-by: Quentin Young <qlyoung@qlyoung.net>
Diffstat (limited to 'ospf6d/ospf6_abr.c')
-rw-r--r-- | ospf6d/ospf6_abr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c index 7bd51138b..465f0291f 100644 --- a/ospf6d/ospf6_abr.c +++ b/ospf6d/ospf6_abr.c @@ -1265,6 +1265,7 @@ static char *ospf6_inter_area_prefix_lsa_get_prefix_str(struct ospf6_lsa *lsa, { struct ospf6_inter_prefix_lsa *prefix_lsa; struct in6_addr in6; + char tbuf[16]; if (lsa != NULL) { prefix_lsa = @@ -1274,8 +1275,9 @@ static char *ospf6_inter_area_prefix_lsa_get_prefix_str(struct ospf6_lsa *lsa, ospf6_prefix_in6_addr(&in6, prefix_lsa, &prefix_lsa->prefix); if (buf) { inet_ntop(AF_INET6, &in6, buf, buflen); - sprintf(&buf[strlen(buf)], "/%d", - prefix_lsa->prefix.prefix_length); + snprintf(tbuf, sizeof(tbuf), "/%d", + prefix_lsa->prefix.prefix_length); + strlcat(buf, tbuf, buflen); } } |