diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2010-06-12 13:09:58 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2010-06-12 13:09:58 +0800 |
commit | 524762d356060ffea62fe04c8411a1555634b1a9 (patch) | |
tree | 22a14c9811b30cb2a8c8bf0cede977b279652f21 | |
parent | 3a32dfbebe11261b5ab4a76e3f6dbf75c5c940d9 (diff) | |
download | pttbbs-524762d356060ffea62fe04c8411a1555634b1a9.tar pttbbs-524762d356060ffea62fe04c8411a1555634b1a9.tar.gz pttbbs-524762d356060ffea62fe04c8411a1555634b1a9.tar.bz2 pttbbs-524762d356060ffea62fe04c8411a1555634b1a9.tar.lz pttbbs-524762d356060ffea62fe04c8411a1555634b1a9.tar.xz pttbbs-524762d356060ffea62fe04c8411a1555634b1a9.tar.zst pttbbs-524762d356060ffea62fe04c8411a1555634b1a9.zip |
* code refine: prevent printf-format security issue
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5062 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/edit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pttbbs/mbbsd/edit.c b/pttbbs/mbbsd/edit.c index 062ac6ce..75844c3e 100644 --- a/pttbbs/mbbsd/edit.c +++ b/pttbbs/mbbsd/edit.c @@ -2000,7 +2000,7 @@ write_file(const char *fpath, int saveheader, int *islocal, char mytitle[STRLEN] *islocal = local_article; if (curr_buf->sitesig_string) - fprintf(fp, curr_buf->sitesig_string); + fputs(curr_buf->sitesig_string, fp); if (currstat == POSTING || currstat == SMAIL) { @@ -2771,7 +2771,7 @@ edit_outs_attr_n(const char *text, int n, int attr) // 7 = *[0;1;3? if (x<0) { attr[4] = '0'; x= -x; } attr[7] = '0' + x; - prints(attr); + outs(attr); doReset = 1; } if (!fWord) |