summaryrefslogtreecommitdiffstats
path: root/mbbsd/mail.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-04-08 22:58:06 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-04-08 22:58:06 +0800
commit4e8a2c25129260c61df345f15715d75c715cb92c (patch)
tree9056598d7d2db1fe74cbe22fcabf047148c00e03 /mbbsd/mail.c
parent55e87717eb4ab1efdcba4d2622c1c98c71f871e3 (diff)
downloadpttbbs-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/mail.c')
-rw-r--r--mbbsd/mail.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index 2b82fb3e..86c1124b 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -1263,6 +1263,7 @@ mail_cross_post(int ent, fileheader_t * fhdr, const char *direct)
return FULLUPDATE;
ent = getbnum(xboard);
+ assert(0<=ent-1 && ent-1<MAX_BOARD);
if ( !((currmode & MODE_BOARD) || HasUserPerm(PERM_SYSOP)) &&
(cuser.firstlogin > (now - (time4_t)bcache[ent - 1].post_limit_regtime * 2592000) ||
cuser.numlogins < ((unsigned int)(bcache[ent - 1].post_limit_logins) * 10) ||