diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2020-04-23 20:27:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-23 20:27:26 +0200 |
| commit | c334a16ef105b7b187943db177ed7623b01e79ba (patch) | |
| tree | 79aa1a7def3eadc711549e9b0e81a773ca5fa569 /lib/command.c | |
| parent | e17316e56ba830e1cab0c4f382af7676a7bf979a (diff) | |
| parent | 08808541857dc78edd5bfd70f776bfbe58b44051 (diff) | |
Merge pull request #6262 from qlyoung/remove-sprintf
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 fbbf10c796..38a7b3fe7c 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1536,7 +1536,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); |
