Check correct number of params for handle353(), thanks to coekie for noticing
authorManuel Nickschas <sputnick@quassel-irc.org>
Sat, 25 Oct 2008 15:18:43 +0000 (17:18 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sat, 25 Oct 2008 15:19:21 +0000 (17:19 +0200)
This could have caused a core crash in case an IRC server sent a bogus/malicious NAMREPLY.

src/core/ircserverhandler.cpp

index 5e3be1d..f466065 100644 (file)
@@ -870,7 +870,7 @@ void IrcServerHandler::handle352(const QString &prefix, const QList<QByteArray>
 /* RPL_NAMREPLY */
 void IrcServerHandler::handle353(const QString &prefix, const QList<QByteArray> &params) {
   Q_UNUSED(prefix);
-  if(!checkParamCount("IrcServerHandler::handle353()", params, 2))
+  if(!checkParamCount("IrcServerHandler::handle353()", params, 3))
     return;
     
   // param[0] is either "=", "*" or "@" indicating a public, private or secret channel