summaryrefslogtreecommitdiff
path: root/zebra/zebra_routemap.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2020-04-20 14:12:38 -0400
committerQuentin Young <qlyoung@cumulusnetworks.com>2020-04-20 19:14:33 -0400
commit772270f3b6a37a2dd9432541cce436e9b45bb6b9 (patch)
treefc7f717a60d056b0300fcf43373a1fff30b94b13 /zebra/zebra_routemap.c
parent3f0cc3ffb3ebbc67ebdc285b8093783ad572fa93 (diff)
*: sprintf -> snprintf
Replace sprintf with snprintf where straightforward to do so. - sprintf's into local scope buffers of known size are replaced with the equivalent snprintf call - snprintf's into local scope buffers of known size that use the buffer size expression now use sizeof(buffer) - sprintf(buf + strlen(buf), ...) replaced with snprintf() into temp buffer followed by strlcat Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_routemap.c')
-rw-r--r--zebra/zebra_routemap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c
index 2b3b3afbb5..9b2a58fd17 100644
--- a/zebra/zebra_routemap.c
+++ b/zebra/zebra_routemap.c
@@ -1860,7 +1860,7 @@ void zebra_routemap_config_write_protocol(struct vty *vty,
memset(space, 0, sizeof(space));
if (zvrf_id(zvrf) != VRF_DEFAULT)
- sprintf(space, "%s", " ");
+ snprintf(space, sizeof(space), "%s", " ");
for (i = 0; i < ZEBRA_ROUTE_MAX; i++) {
if (PROTO_RM_NAME(zvrf, AFI_IP, i))