diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2011-10-13 23:51:50 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2011-10-13 23:51:50 +0800 |
commit | 70b31ea898bc5815bdad0291643bfb5669b8b0df (patch) | |
tree | 88d524afc39cd8ebf232ef6f4dd0a05c18ae0df0 | |
parent | f885806dd76c59591c2b769305179588a5021ffa (diff) | |
download | pttbbs-70b31ea898bc5815bdad0291643bfb5669b8b0df.tar pttbbs-70b31ea898bc5815bdad0291643bfb5669b8b0df.tar.gz pttbbs-70b31ea898bc5815bdad0291643bfb5669b8b0df.tar.bz2 pttbbs-70b31ea898bc5815bdad0291643bfb5669b8b0df.tar.lz pttbbs-70b31ea898bc5815bdad0291643bfb5669b8b0df.tar.xz pttbbs-70b31ea898bc5815bdad0291643bfb5669b8b0df.tar.zst pttbbs-70b31ea898bc5815bdad0291643bfb5669b8b0df.zip |
fix snprintf param error
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5420 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/bbs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pttbbs/mbbsd/bbs.c b/pttbbs/mbbsd/bbs.c index c603248d..e3c96c4f 100644 --- a/pttbbs/mbbsd/bbs.c +++ b/pttbbs/mbbsd/bbs.c @@ -1045,7 +1045,8 @@ log_crosspost_in_allpost(const char *brd, const fileheader_t *postfile) { strlcpy(fh.owner, cuser.userid, sizeof(fh.owner)); strlcpy(genbuf, title, len); DBCS_safe_trim(genbuf); - snprintf(fh.title, "%s%-*.*s.%sªO", str_forward, len, len, genbuf, brd); + snprintf(fh.title, sizeof(fh.title), + "%s%-*.*s.%sªO", str_forward, len, len, genbuf, brd); setbdir(genbuf, BN_ALLPOST); if (append_record(genbuf, &fh, sizeof(fileheader_t)) != -1) { |