diff options
author | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-01-12 13:00:08 +0800 |
---|---|---|
committer | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-01-12 13:00:08 +0800 |
commit | 927c9665ce01fdade6a0846ad60a561320272440 (patch) | |
tree | e84f4cb1a3aa4403408b96fd9aa4ecf6db84eab5 /mbbsd/record.c | |
parent | 395dca515d5b5e9b6d5d3666b96b7fc573e12bc2 (diff) | |
download | pttbbs-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/record.c')
-rw-r--r-- | mbbsd/record.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mbbsd/record.c b/mbbsd/record.c index e765198d..b7ed123b 100644 --- a/mbbsd/record.c +++ b/mbbsd/record.c @@ -568,7 +568,7 @@ append_record_forward(char *fpath, fileheader_t * record, int size, const char * int n; for (n = strlen(fpath) - 1; fpath[n] != '/' && n > 0; n--); - strncpy(buf, fpath, n + 1); + strlcpy(buf, fpath, n + 1); if (n + sizeof(".forward") > sizeof(buf)) return -1; strcpy(buf + n + 1, ".forward"); |