From: Manuel Nickschas Date: Sat, 25 Oct 2008 15:18:43 +0000 (+0200) Subject: Check correct number of params for handle353(), thanks to coekie for noticing X-Git-Tag: 0.3.1~130 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=4d97c55d7f8864041b891b2d2f13c909f8b548f8;hp=bcc567f2559058f38ca8ffecf7ef4428483cb540 Check correct number of params for handle353(), thanks to coekie for noticing This could have caused a core crash in case an IRC server sent a bogus/malicious NAMREPLY. --- diff --git a/src/core/ircserverhandler.cpp b/src/core/ircserverhandler.cpp index 5e3be1db..f4660656 100644 --- a/src/core/ircserverhandler.cpp +++ b/src/core/ircserverhandler.cpp @@ -870,7 +870,7 @@ void IrcServerHandler::handle352(const QString &prefix, const QList /* RPL_NAMREPLY */ void IrcServerHandler::handle353(const QString &prefix, const QList ¶ms) { 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