summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
Diffstat (limited to 'src/login')
-rw-r--r--src/login/login.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/login/login.c b/src/login/login.c
index f81ee30c7..7de5dbb76 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -1404,7 +1404,7 @@ int parse_login(int fd)
}
safestrncpy(username, accname, NAME_LENGTH);
- safestrncpy(password, token, PASSWD_LEN);
+ safestrncpy(password, token, min(uTokenLen+1, PASSWD_LEN)); // Variable-length field, don't copy more than necessary
clienttype = RFIFOB(fd, 8);
}
else