From 70b31ea898bc5815bdad0291643bfb5669b8b0df Mon Sep 17 00:00:00 2001 From: piaip Date: Thu, 13 Oct 2011 15:51:50 +0000 Subject: fix snprintf param error git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5420 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- pttbbs/mbbsd/bbs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { -- cgit v1.2.3