summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-03-26 20:24:40 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-03-26 20:24:40 +0800
commit1a82ceff0f054676003bc564138db536b5cb7a72 (patch)
tree78a604ef6641ea165dd6b7aadd80852849b89316
parent0beaa1881e3b5addef5c64f334ce2f0293136fc1 (diff)
downloadpttbbs-1a82ceff0f054676003bc564138db536b5cb7a72.tar
pttbbs-1a82ceff0f054676003bc564138db536b5cb7a72.tar.gz
pttbbs-1a82ceff0f054676003bc564138db536b5cb7a72.tar.bz2
pttbbs-1a82ceff0f054676003bc564138db536b5cb7a72.tar.lz
pttbbs-1a82ceff0f054676003bc564138db536b5cb7a72.tar.xz
pttbbs-1a82ceff0f054676003bc564138db536b5cb7a72.tar.zst
pttbbs-1a82ceff0f054676003bc564138db536b5cb7a72.zip
security fix
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@721 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/board.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 2aed6b3e..dc2596ed 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -1,4 +1,4 @@
-/* $Id: board.c,v 1.94 2003/03/26 12:11:40 victor Exp $ */
+/* $Id: board.c,v 1.95 2003/03/26 12:24:40 in2 Exp $ */
#include "bbs.h"
#define BRC_STRLEN 15 /* Length of board name */
#define BRC_MAXSIZE 24576
@@ -739,11 +739,16 @@ load_boards(char *key)
if (class_bid <= 0) {
nbrd = (boardstat_t *) MALLOC(sizeof(boardstat_t) * numboards);
if( yank_flag == 0 ){ // fav mode
- for( i = 0 ; i < fav->nDatas ; ++i ){
- if( fav->b[i].attr & (BRD_FAV | BRD_LINE) )
- addnewbrdstat(fav->b[i].bid - 1, BRD_LINE);
- else if (fav->b[i].attr & BRD_FAV && (state = Ben_Perm( (bptr = &bcache[ fav->b[i].bid - 1 ]))))
- addnewbrdstat(fav->b[i].bid - 1, state);
+ for( i = 0 ; i < fav->nDatas ; ++i ){
+ if( fav->b[i].attr & BRD_FAV ){
+ if( fav->b[i].attr & BRD_LINE )
+ addnewbrdstat(fav->b[i].bid - 1, BRD_LINE);
+ else{
+ bptr = &bcache[ fav->b[i].bid - 1 ];
+ if( (state = Ben_Perm(bptr)) )
+ addnewbrdstat(fav->b[i].bid - 1, state);
+ }
+ }
}
}
else{ // general case