summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2020-04-20 17:59:31 -0400
committerQuentin Young <qlyoung@cumulusnetworks.com>2020-04-20 19:14:33 -0400
commitfc746f1c01daf34600d83293647199e81fcb8316 (patch)
treef26168f502d6b5faaffff8c7945acbb88c885fa1 /lib/command.c
parent772270f3b6a37a2dd9432541cce436e9b45bb6b9 (diff)
*: 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/command.c')
-rw-r--r--lib/command.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/command.c b/lib/command.c
index 7abca5e70d..6ee04e9c9b 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -1535,7 +1535,8 @@ static int file_write_config(struct vty *vty)
config_file_tmp = XMALLOC(MTYPE_TMP, strlen(config_file) + 8);
- sprintf(config_file_tmp, "%s.XXXXXX", config_file);
+ snprintf(config_file_tmp, strlen(config_file) + 8, "%s.XXXXXX",
+ config_file);
/* Open file to configuration write. */
fd = mkstemp(config_file_tmp);