diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-07-23 03:02:01 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-07-23 03:02:01 +0800 |
commit | 8b45fd166b943e17dabb3f5cdf972baeb58e0346 (patch) | |
tree | 7b2e5bf09b7c9fd812d0ae7cacdfa049c4dc1e07 /mbbsd/gomo.c | |
parent | a1bd04d7decea39d51bbc06b50755976d4184c50 (diff) | |
download | pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.tar pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.tar.gz pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.tar.bz2 pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.tar.lz pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.tar.xz pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.tar.zst pttbbs-8b45fd166b943e17dabb3f5cdf972baeb58e0346.zip |
sprintf() -> snprintf()
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@435 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/gomo.c')
-rw-r--r-- | mbbsd/gomo.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mbbsd/gomo.c b/mbbsd/gomo.c index c6870e3f..7822b090 100644 --- a/mbbsd/gomo.c +++ b/mbbsd/gomo.c @@ -1,4 +1,4 @@ -/* $Id: gomo.c,v 1.8 2002/07/21 09:26:02 in2 Exp $ */ +/* $Id: gomo.c,v 1.9 2002/07/22 19:02:00 in2 Exp $ */ #include "bbs.h" static char *chess[] = {"¡´", "¡³"}; @@ -53,8 +53,8 @@ HO_log(char *user) Horder_t *ptr = pool; fileheader_t mymail; - sprintf(buf, "home/%c/%s/F.%d", cuser.userid[0], cuser.userid, - rand() & 65535); + snprintf(buf, sizeof(buf), "home/%c/%s/F.%d", + cuser.userid[0], cuser.userid, rand() & 65535); log = fopen(buf, "w"); for (i = 1; i < 17; i++) @@ -73,8 +73,8 @@ HO_log(char *user) mymail.filemode = FILE_READ | FILE_HOLD; strlcpy(mymail.owner, "[³Æ.§Ñ.¿ý]", sizeof(mymail.owner)); - sprintf(mymail.title, "\033[37;41m´ÑÃÐ\033[m %s VS %s", - cuser.userid, user); + snprintf(mymail.title, sizeof(mymail.title), + "\033[37;41m´ÑÃÐ\033[m %s VS %s", cuser.userid, user); sethomedir(title, cuser.userid); Rename(buf, buf1); append_record(title, &mymail, sizeof(mymail)); |