diff options
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); |