summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-03-26 18:51:15 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-03-26 18:51:15 +0800
commit54bd97319d19e80a2414d3f78383c23a2391a2b1 (patch)
tree044879ffce39d9f96c0b9f6e272954c388efec41
parent63f5dcb19386ec4f0e791ad820602f8a50e1a1fb (diff)
downloadpttbbs-54bd97319d19e80a2414d3f78383c23a2391a2b1.tar
pttbbs-54bd97319d19e80a2414d3f78383c23a2391a2b1.tar.gz
pttbbs-54bd97319d19e80a2414d3f78383c23a2391a2b1.tar.bz2
pttbbs-54bd97319d19e80a2414d3f78383c23a2391a2b1.tar.lz
pttbbs-54bd97319d19e80a2414d3f78383c23a2391a2b1.tar.xz
pttbbs-54bd97319d19e80a2414d3f78383c23a2391a2b1.tar.zst
pttbbs-54bd97319d19e80a2414d3f78383c23a2391a2b1.zip
security fix
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@716 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/board.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c
index e5e0460e..f45c9815 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -1,4 +1,4 @@
-/* $Id: board.c,v 1.89 2003/03/26 10:30:59 in2 Exp $ */
+/* $Id: board.c,v 1.90 2003/03/26 10:51:15 in2 Exp $ */
#include "bbs.h"
#define BRC_STRLEN 15 /* Length of board name */
#define BRC_MAXSIZE 24576
@@ -740,10 +740,15 @@ load_boards(char *key)
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);
+ 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