summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-27 18:55:30 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-27 18:55:30 +0800
commit2d1e63cf05d4daac544e217e6c33c133e4a58022 (patch)
tree1c6be7eca5602d309d1dfb2263868ea35f42d36b
parent6b83336471190ccd09f35a63610f6ed16a44c2de (diff)
downloadpttbbs-2d1e63cf05d4daac544e217e6c33c133e4a58022.tar
pttbbs-2d1e63cf05d4daac544e217e6c33c133e4a58022.tar.gz
pttbbs-2d1e63cf05d4daac544e217e6c33c133e4a58022.tar.bz2
pttbbs-2d1e63cf05d4daac544e217e6c33c133e4a58022.tar.lz
pttbbs-2d1e63cf05d4daac544e217e6c33c133e4a58022.tar.xz
pttbbs-2d1e63cf05d4daac544e217e6c33c133e4a58022.tar.zst
pttbbs-2d1e63cf05d4daac544e217e6c33c133e4a58022.zip
replace strlcat with strcat, which cause crash
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@445 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/more.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mbbsd/more.c b/mbbsd/more.c
index 2acf144d..d7508ce4 100644
--- a/mbbsd/more.c
+++ b/mbbsd/more.c
@@ -1,4 +1,4 @@
-/* $Id: more.c,v 1.18 2002/07/22 19:02:00 in2 Exp $ */
+/* $Id: more.c,v 1.19 2002/07/27 10:55:30 kcwu Exp $ */
#include "bbs.h"
#define MORE_BUFSIZE 4096
#define MORE_WINSIZE 4096
@@ -254,9 +254,9 @@ more(char *fpath, int promptend)
snprintf(buf1, sizeof(buf1),
"%.*s\033[7m%s\033[m", pos - pos1,
pos1, SearchStr);
- strcat(msg, buf1);
+ strlcat(msg, buf1, sizeof(msg));
}
- strcat(msg, pos1);
+ strlcat(msg, pos1, sizeof(msg));
outs(Ptt_prints(msg, NO_RELOAD));
} else
outs(Ptt_prints(buf, NO_RELOAD));