summaryrefslogtreecommitdiffstats
path: root/mbbsd/read.c
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-01-12 13:00:08 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-01-12 13:00:08 +0800
commit927c9665ce01fdade6a0846ad60a561320272440 (patch)
treee84f4cb1a3aa4403408b96fd9aa4ecf6db84eab5 /mbbsd/read.c
parent395dca515d5b5e9b6d5d3666b96b7fc573e12bc2 (diff)
downloadpttbbs-927c9665ce01fdade6a0846ad60a561320272440.tar
pttbbs-927c9665ce01fdade6a0846ad60a561320272440.tar.gz
pttbbs-927c9665ce01fdade6a0846ad60a561320272440.tar.bz2
pttbbs-927c9665ce01fdade6a0846ad60a561320272440.tar.lz
pttbbs-927c9665ce01fdade6a0846ad60a561320272440.tar.xz
pttbbs-927c9665ce01fdade6a0846ad60a561320272440.tar.zst
pttbbs-927c9665ce01fdade6a0846ad60a561320272440.zip
replace some strncpy with strlcpy, or just strcpy if src is const
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3267 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/read.c')
-rw-r--r--mbbsd/read.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mbbsd/read.c b/mbbsd/read.c
index d20a0676..d5ece956 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -384,8 +384,7 @@ mail_forward(const fileheader_t * fhdr, const char *direct, int mode)
char buf[STRLEN];
char *p;
- strncpy(buf, direct, sizeof(buf)-1);
- buf[sizeof(buf)-1] = 0;
+ strlcpy(buf, direct, sizeof(buf));
if ((p = strrchr(buf, '/')))
*p = '\0';
switch (i = doforward(buf, fhdr, mode)) {