diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-05-12 14:54:41 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-05-12 14:54:41 +0800 |
commit | 9284b6d362482ce703e8593e4bc18fff5429f14d (patch) | |
tree | c4ff5a9a3827566e4590b30132a25fa5f2d89c7b | |
parent | 14fc5fbbc55fb713299c3e8f5900a2c6141b9b2c (diff) | |
download | pttbbs-9284b6d362482ce703e8593e4bc18fff5429f14d.tar pttbbs-9284b6d362482ce703e8593e4bc18fff5429f14d.tar.gz pttbbs-9284b6d362482ce703e8593e4bc18fff5429f14d.tar.bz2 pttbbs-9284b6d362482ce703e8593e4bc18fff5429f14d.tar.lz pttbbs-9284b6d362482ce703e8593e4bc18fff5429f14d.tar.xz pttbbs-9284b6d362482ce703e8593e4bc18fff5429f14d.tar.zst pttbbs-9284b6d362482ce703e8593e4bc18fff5429f14d.zip |
- mbbsd: fix mind init size
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4304 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/mbbsd.c | 4 |
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; |