summaryrefslogtreecommitdiff
path: root/vtysh/vtysh_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'vtysh/vtysh_user.c')
-rw-r--r--vtysh/vtysh_user.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vtysh/vtysh_user.c b/vtysh/vtysh_user.c
index a7067984c4..665e6ca90d 100644
--- a/vtysh/vtysh_user.c
+++ b/vtysh/vtysh_user.c
@@ -115,7 +115,8 @@ void user_config_write(void)
for (ALL_LIST_ELEMENTS(userlist, node, nnode, user)) {
if (user->nopassword) {
- sprintf(line, "username %s nopassword", user->name);
+ snprintf(line, sizeof(line), "username %s nopassword",
+ user->name);
config_add_line(config_top, line);
}
}