summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-05-12 14:54:41 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-05-12 14:54:41 +0800
commita40da8715e3c8c1dfc7ed554696256f2e156ec44 (patch)
treee42ab21c3b6afe08cda8fb2aecc5fb1d2712a5c3
parente7edb8de1756c34bc41b7a5fa2e8fd9eef59e2d0 (diff)
downloadpttbbs-a40da8715e3c8c1dfc7ed554696256f2e156ec44.tar
pttbbs-a40da8715e3c8c1dfc7ed554696256f2e156ec44.tar.gz
pttbbs-a40da8715e3c8c1dfc7ed554696256f2e156ec44.tar.bz2
pttbbs-a40da8715e3c8c1dfc7ed554696256f2e156ec44.tar.lz
pttbbs-a40da8715e3c8c1dfc7ed554696256f2e156ec44.tar.xz
pttbbs-a40da8715e3c8c1dfc7ed554696256f2e156ec44.tar.zst
pttbbs-a40da8715e3c8c1dfc7ed554696256f2e156ec44.zip
- mbbsd: fix mind init size
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@4304 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/mbbsd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pttbbs/mbbsd/mbbsd.c b/pttbbs/mbbsd/mbbsd.c
index 5c661139..f907eae8 100644
--- a/pttbbs/mbbsd/mbbsd.c
+++ b/pttbbs/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;