diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-23 11:52:06 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-23 11:52:06 +0800 |
commit | 9ad97ad4b96e2a975f196d19cd43af34cd8beaca (patch) | |
tree | 8d89022be11e10f6e5218ef0b13a665de605b40a /mbbsd/bbs.c | |
parent | 7dfb1cd0396127830a9ba1011f0febf702e61e75 (diff) | |
download | pttbbs-9ad97ad4b96e2a975f196d19cd43af34cd8beaca.tar pttbbs-9ad97ad4b96e2a975f196d19cd43af34cd8beaca.tar.gz pttbbs-9ad97ad4b96e2a975f196d19cd43af34cd8beaca.tar.bz2 pttbbs-9ad97ad4b96e2a975f196d19cd43af34cd8beaca.tar.lz pttbbs-9ad97ad4b96e2a975f196d19cd43af34cd8beaca.tar.xz pttbbs-9ad97ad4b96e2a975f196d19cd43af34cd8beaca.tar.zst pttbbs-9ad97ad4b96e2a975f196d19cd43af34cd8beaca.zip |
set*() family functions all assume buffer size = PATHLEN, to prevent buffer overflow.
do some s/256/PATHLEN/.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3074 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r-- | mbbsd/bbs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index fbe6b7ef..e2c485fe 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1038,7 +1038,7 @@ b_posttype(int ent, const fileheader_t * fhdr, const char *direct) { boardheader_t *bp; int i, aborted; - char filepath[256], genbuf[60], title[5], posttype_f, posttype[33]=""; + char filepath[PATHLEN], genbuf[60], title[5], posttype_f, posttype[33]=""; if(!(currmode & MODE_BOARD)) return DONOTHING; @@ -1671,7 +1671,7 @@ hold_gamble(int ent, const fileheader_t * fhdr, const char *direct) static int cite_post(int ent, const fileheader_t * fhdr, const char *direct) { - char fpath[256]; + char fpath[PATHLEN]; char title[TTLEN + 1]; setbfile(fpath, currboard, fhdr->filename); @@ -1753,7 +1753,7 @@ static int do_add_recommend(const char *direct, fileheader_t *fhdr, int ent, const char *buf, int type) { - char path[256]; + char path[PATHLEN]; int update = 0; /* race here: @@ -1800,7 +1800,7 @@ static int do_bid(int ent, fileheader_t * fhdr, const boardheader_t *bp, const char *direct, const struct tm *ptime) { - char genbuf[200], fpath[256],say[30],*money; + char genbuf[200], fpath[PATHLEN],say[30],*money; bid_t bidinfo; int mymax, next; @@ -2213,7 +2213,7 @@ del_range(int ent, const fileheader_t *fhdr, const char *direct) static int del_post(int ent, fileheader_t * fhdr, char *direct) { - char genbuf[100], newpath[256]; + char genbuf[100], newpath[PATHLEN]; int not_owned, tusernum; boardheader_t *bp; |