summaryrefslogtreecommitdiffstats
path: root/lib/vty.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2020-04-20 23:59:31 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2020-04-21 01:14:33 +0200
commitfc746f1c01daf34600d83293647199e81fcb8316 (patch)
treef26168f502d6b5faaffff8c7945acbb88c885fa1 /lib/vty.c
parent*: sprintf -> snprintf (diff)
downloadfrr-fc746f1c01daf34600d83293647199e81fcb8316.tar.xz
frr-fc746f1c01daf34600d83293647199e81fcb8316.zip
*: manually remove some more sprintf
Take care of some more complicated cases by hand Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/vty.c')
-rw-r--r--lib/vty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vty.c b/lib/vty.c
index 34beb0a1a..784f9cf2a 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2380,7 +2380,7 @@ static FILE *vty_use_backup_config(const char *fullpath)
}
fullpath_tmp = malloc(strlen(fullpath) + 8);
- sprintf(fullpath_tmp, "%s.XXXXXX", fullpath);
+ snprintf(fullpath_tmp, strlen(fullpath) + 8, "%s.XXXXXX", fullpath);
/* Open file to configuration write. */
tmp = mkstemp(fullpath_tmp);