diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-03-23 01:57:26 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-03-23 01:57:26 +0800 |
commit | f3345cd954974f80862940ec628f17942a288316 (patch) | |
tree | 2a128eaf2a8808e479f898885094a32498bf7a2b /mbbsd/record.c | |
parent | 35e59bbab441a93c6079b1a64006e07b4f9b977c (diff) | |
download | pttbbs-f3345cd954974f80862940ec628f17942a288316.tar pttbbs-f3345cd954974f80862940ec628f17942a288316.tar.gz pttbbs-f3345cd954974f80862940ec628f17942a288316.tar.bz2 pttbbs-f3345cd954974f80862940ec628f17942a288316.tar.lz pttbbs-f3345cd954974f80862940ec628f17942a288316.tar.xz pttbbs-f3345cd954974f80862940ec628f17942a288316.tar.zst pttbbs-f3345cd954974f80862940ec628f17942a288316.zip |
fix bugs introduced because replace sprintf and strncpy with snprintf and strlcpy without careful checks.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3292 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 987b3e3d..79523c69 100644 --- a/mbbsd/record.c +++ b/mbbsd/record.c @@ -574,7 +574,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--); - strlcpy(buf, fpath, n + 1); + strncpy(buf, fpath, n + 1); if (n + sizeof(".forward") > sizeof(buf)) return -1; strcpy(buf + n + 1, ".forward"); |