aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--monitor.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/monitor.c b/monitor.c
index f142a879f4..bec9211b21 100644
--- a/monitor.c
+++ b/monitor.c
@@ -434,8 +434,7 @@ static void do_change_vnc(const char *target)
if (strcmp(target, "passwd") == 0 ||
strcmp(target, "password") == 0) {
char password[9];
- monitor_readline("Password: ", 1, password, sizeof(password)-1);
- password[sizeof(password)-1] = '\0';
+ monitor_readline("Password: ", 1, password, sizeof(password));
if (vnc_display_password(NULL, password) < 0)
term_printf("could not set VNC server password\n");
} else {