summaryrefslogtreecommitdiffstats
path: root/mbbsd/announce.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-30 13:53:24 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-30 13:53:24 +0800
commit411661c4660d61b365224c5263e5ae93ef04c194 (patch)
tree986602046f5b3e92112274abddadbc61bb8559c9 /mbbsd/announce.c
parentc5484be541d5c1e1929b5dce01cd757fb65d5974 (diff)
downloadpttbbs-411661c4660d61b365224c5263e5ae93ef04c194.tar
pttbbs-411661c4660d61b365224c5263e5ae93ef04c194.tar.gz
pttbbs-411661c4660d61b365224c5263e5ae93ef04c194.tar.bz2
pttbbs-411661c4660d61b365224c5263e5ae93ef04c194.tar.lz
pttbbs-411661c4660d61b365224c5263e5ae93ef04c194.tar.xz
pttbbs-411661c4660d61b365224c5263e5ae93ef04c194.tar.zst
pttbbs-411661c4660d61b365224c5263e5ae93ef04c194.zip
- more check for TagNum
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3764 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/announce.c')
-rw-r--r--mbbsd/announce.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mbbsd/announce.c b/mbbsd/announce.c
index 4b2382c1..3d293fb0 100644
--- a/mbbsd/announce.c
+++ b/mbbsd/announce.c
@@ -631,8 +631,12 @@ a_pastetagpost(menu_t * pm, int mode)
tagnum = TagNum;
// prevent if anything wrong
- if (tagnum >= MAXTAGS)
- tagnum = MAXTAGS;
+ if (tagnum >= MAXTAGS || tagnum < 0)
+ {
+ vmsg("內部錯誤。請把你剛剛進行的完整步驟貼到 "
+ GLOBAL_BUGREPORT " 板。");
+ return ans;
+ }
if (tagnum < 1)
return ans;