From fc746f1c01daf34600d83293647199e81fcb8316 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Mon, 20 Apr 2020 17:59:31 -0400 Subject: *: manually remove some more sprintf Take care of some more complicated cases by hand Signed-off-by: Quentin Young --- lib/command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/command.c') diff --git a/lib/command.c b/lib/command.c index 7abca5e70..6ee04e9c9 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); -- cgit v1.2.3