Module: ngircd.git Branch: master Commit: 888664435aa81f20b204e2f9629678b606697bc5 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=88866...
Author: Alexander Barton alex@barton.de Date: Fri Jan 6 17:42:52 2012 +0100
Channel modes: really break handling when MAX_CMODES_ARG is hit
This fixes 98493077.
---
src/ngircd/irc-mode.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/ngircd/irc-mode.c b/src/ngircd/irc-mode.c index 9afe907..7eb81cf 100644 --- a/src/ngircd/irc-mode.c +++ b/src/ngircd/irc-mode.c @@ -492,7 +492,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel) break; case 'k': /* Channel key */ if (mode_arg_count++ >= MAX_CMODES_ARG) - break; + goto chan_exit; if (!set) { if (modeok) x[0] = *mode_ptr; @@ -528,7 +528,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel) break; case 'l': /* Member limit */ if (mode_arg_count++ >= MAX_CMODES_ARG) - break; + goto chan_exit; if (!set) { if (modeok) x[0] = *mode_ptr; @@ -640,7 +640,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel) case 'I': /* Invite lists */ case 'b': /* Ban lists */ if (mode_arg_count++ >= MAX_CMODES_ARG) - break; + goto chan_exit; if (arg_arg > mode_arg) { /* modify list */ if (modeok) {