Skip to content

Commit

Permalink
chmode: stop processing when too many modes
Browse files Browse the repository at this point in the history
  • Loading branch information
edk0 committed Jul 13, 2021
1 parent c7496b6 commit b9a7173
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ircd/chmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1360,13 +1360,13 @@ set_channel_mode(struct Client *client_p, struct Client *source_p,
char mode;
};

static struct modeset modesets[MAXPARA];
static struct modeset modesets[MAXMODEPARAMS + MAXMODES_SIMPLE];
struct modeset *ms = modesets, *mend;
char canon_op = '\0';

mbuf = modebuf;

for (ml = parv[0]; *ml != 0; ml++)
for (ml = parv[0]; *ml != 0 && ms - modesets < ARRAY_SIZE(modesets); ml++)
{
c = *ml;
switch (c)
Expand Down

0 comments on commit b9a7173

Please sign in to comment.