diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-04-08 22:58:06 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-04-08 22:58:06 +0800 |
commit | 4e8a2c25129260c61df345f15715d75c715cb92c (patch) | |
tree | 9056598d7d2db1fe74cbe22fcabf047148c00e03 /mbbsd/menu.c | |
parent | 55e87717eb4ab1efdcba4d2622c1c98c71f871e3 (diff) | |
download | pttbbs-4e8a2c25129260c61df345f15715d75c715cb92c.tar pttbbs-4e8a2c25129260c61df345f15715d75c715cb92c.tar.gz pttbbs-4e8a2c25129260c61df345f15715d75c715cb92c.tar.bz2 pttbbs-4e8a2c25129260c61df345f15715d75c715cb92c.tar.lz pttbbs-4e8a2c25129260c61df345f15715d75c715cb92c.tar.xz pttbbs-4e8a2c25129260c61df345f15715d75c715cb92c.tar.zst pttbbs-4e8a2c25129260c61df345f15715d75c715cb92c.zip |
add a lot of assertions to ensure bid is in correct range when access via bid.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3341 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/menu.c')
-rw-r--r-- | mbbsd/menu.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mbbsd/menu.c b/mbbsd/menu.c index 99c2c8ba..fa111d4f 100644 --- a/mbbsd/menu.c +++ b/mbbsd/menu.c @@ -51,6 +51,7 @@ showtitle(const char *title, const char *mid) int bid = getbnum(currboard); if(bid > 0) { + assert(0<=bid-1 && bid-1<MAX_BOARD); board_hidden_status = ((getbcache(bid)->brdattr & BRD_HIDE) && (getbcache(bid)->brdattr & BRD_POSTMASK)); strlcpy(lastboard, currboard, sizeof(lastboard)); |