Author: Jan Krueger <jast@heapsort.de> (by way of Kev <klmitch@mit.edu>)
authorKevin L. Mitchell <klmitch@mit.edu>
Thu, 3 Jan 2008 00:07:21 +0000 (00:07 +0000)
committerKevin L. Mitchell <klmitch@mit.edu>
Thu, 3 Jan 2008 00:07:21 +0000 (00:07 +0000)
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
ircd/m_burst.c

index 7375462c3252e0a40806a8fc632f432384491f50..876e1ad712104bc44a2905eacf44d4baec9755db 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-01-02  Kevin L. Mitchell  <klmitch@mit.edu>
+
+       * 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  <jast@heapsort.de>
+
+       * 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  <klmitch@mit.edu>
 
        * ircd/channel.c: add MODE_REGISTERED, mapped to +R; arrange to
index 1b19a6a02c3857a31e111174299f05eb2e2a0240..649898d22b83e586f28728aab3392ddb74b9f53e 100644 (file)
@@ -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 */
+               }
              }
            }
          }