summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/mbbsd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 5c661139..f907eae8 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -964,9 +964,11 @@ setup_utmp(int mode)
strlcpy(uinfo.userid, cuser.userid, sizeof(uinfo.userid));
strlcpy(uinfo.nickname, cuser.nickname, sizeof(uinfo.nickname));
- strlcpy(uinfo.mind, cuser.mind, sizeof(uinfo.mind));
strlcpy(uinfo.from, fromhost, sizeof(uinfo.from));
+ // 當初設計的人把 mind 設計成非 NULL terminated 的...
+ memcpy(uinfo.mind, cuser.mind, sizeof(cuser.mind));
+
uinfo.five_win = cuser.five_win;
uinfo.five_lose = cuser.five_lose;
uinfo.five_tie = cuser.five_tie;