From ebff73ec9b40bba463e7f2bacb92b5c7110969e2 Mon Sep 17 00:00:00 2001 From: "Kevin L. Mitchell" Date: Thu, 3 Jan 2008 00:07:21 +0000 Subject: [PATCH] Author: Jan Krueger (by way of Kev ) Log message: Correct a parsing problem with ms_burst() that could cause an overrun when processing bursts with oplevels. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1861 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 10 ++++++++++ ircd/m_burst.c | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7375462..876e1ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-01-02 Kevin L. Mitchell + + * ircd/m_burst.c (ms_burst): surround protocol_violation() and + break in braces to do what Jan Krueger was trying to do... + +2008-01-03 Jan Krueger + + * ircd/m_burst.c: prevent leaking the next nick into the current one's + oplevel. Add protocol_violation when an invalid nick flag appears. + 2007-12-28 Kevin L. Mitchell * ircd/channel.c: add MODE_REGISTERED, mapped to +R; arrange to diff --git a/ircd/m_burst.c b/ircd/m_burst.c index 1b19a6a..649898d 100644 --- a/ircd/m_burst.c +++ b/ircd/m_burst.c @@ -507,10 +507,13 @@ int ms_burst(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) do { level_increment = 10 * level_increment + *ptr++ - '0'; } while (IsDigit(*ptr)); + --ptr; oplevel += level_increment; } - else /* I don't recognize that flag */ + else { /* I don't recognize that flag */ + protocol_violation(sptr, "Invalid flag '%c' in nick part of burst", *ptr); break; /* so stop processing */ + } } } } -- 2.20.1