diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-07-27 18:55:30 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-07-27 18:55:30 +0800 |
commit | 5563665c60817e90df1b95dd710821b17dcdc8d3 (patch) | |
tree | 298209b40df00486f2d103a717052f9b2f9186eb | |
parent | 0bd7867689a272f1f120901e733cc5598941469c (diff) | |
download | pttbbs-5563665c60817e90df1b95dd710821b17dcdc8d3.tar pttbbs-5563665c60817e90df1b95dd710821b17dcdc8d3.tar.gz pttbbs-5563665c60817e90df1b95dd710821b17dcdc8d3.tar.bz2 pttbbs-5563665c60817e90df1b95dd710821b17dcdc8d3.tar.lz pttbbs-5563665c60817e90df1b95dd710821b17dcdc8d3.tar.xz pttbbs-5563665c60817e90df1b95dd710821b17dcdc8d3.tar.zst pttbbs-5563665c60817e90df1b95dd710821b17dcdc8d3.zip |
replace strlcat with strcat, which cause crash
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@445 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/more.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pttbbs/mbbsd/more.c b/pttbbs/mbbsd/more.c index 2acf144d..d7508ce4 100644 --- a/pttbbs/mbbsd/more.c +++ b/pttbbs/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)); |