summaryrefslogtreecommitdiffstats
path: root/mbbsd/xyz.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-23 03:02:01 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-23 03:02:01 +0800
commit8b45fd166b943e17dabb3f5cdf972baeb58e0346 (patch)
tree7b2e5bf09b7c9fd812d0ae7cacdfa049c4dc1e07 /mbbsd/xyz.c
parenta1bd04d7decea39d51bbc06b50755976d4184c50 (diff)
downloadpttbbs-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/xyz.c')
-rw-r--r--mbbsd/xyz.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mbbsd/xyz.c b/mbbsd/xyz.c
index e277421d..dba8ad13 100644
--- a/mbbsd/xyz.c
+++ b/mbbsd/xyz.c
@@ -1,4 +1,4 @@
-/* $Id: xyz.c,v 1.11 2002/07/21 09:26:02 in2 Exp $ */
+/* $Id: xyz.c,v 1.12 2002/07/22 19:02:01 in2 Exp $ */
#include "bbs.h"
/* 各種統計及相關資訊列表 */
@@ -230,13 +230,13 @@ note()
collect = 1;
while (total) {
- sprintf(buf, "\033[1;31m╭┤\033[32m %s \033[37m(%s)",
+ snprintf(buf, sizeof(buf), "\033[1;31m╭┤\033[32m %s \033[37m(%s)",
myitem.userid, myitem.username);
len = strlen(buf);
for (i = len; i < 73; i++)
strcat(buf, " ");
- sprintf(buf2, " \033[1;36m%.14s\033[31m ├╮\033[m\n",
+ snprintf(buf2, sizeof(buf2), " \033[1;36m%.14s\033[31m ├╮\033[m\n",
Cdate(&(myitem.date)));
strcat(buf, buf2);
fputs(buf, fp);
@@ -444,7 +444,7 @@ x_archie()
exec_cmd(ARCHIE, YEA, "bin/archie.sh", ARCHIE);
log_usies("ARCHIE", "");
strcpy(genbuf1, buf);
- sprintf(buf, BBSHOME "/tmp/archie.%s", cuser.userid);
+ snprintf(buf, sizeof(buf), BBSHOME "/tmp/archie.%s", cuser.userid);
if (dashf(buf)) {
getdata(0, 0, "要將結果寄回信箱嗎(Y/N)?[N]",
ans, sizeof(ans), DOECHO, 0);
@@ -456,7 +456,8 @@ x_archie()
sethomepath(buf1, cuser.userid);
stampfile(buf1, &mhdr);
strcpy(mhdr.owner, cuser.userid);
- sprintf(genbuf2, "Archie 搜尋檔案: %s 結果", genbuf1);
+ sprintf(genbuf2, sizeof(genbuf2),
+ "Archie 搜尋檔案: %s 結果", genbuf1);
strcpy(mhdr.title, genbuf2);
mhdr.filemode = 0;
sethomedir(title, cuser.userid);