diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2020-04-20 23:59:31 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2020-04-21 01:14:33 +0200 |
commit | fc746f1c01daf34600d83293647199e81fcb8316 (patch) | |
tree | f26168f502d6b5faaffff8c7945acbb88c885fa1 /lib/command.c | |
parent | *: sprintf -> snprintf (diff) | |
download | frr-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/command.c')
-rw-r--r-- | lib/command.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |