From 783dc0f595ecf90e37225a57da0ffa2c030a470d Mon Sep 17 00:00:00 2001 From: Peter Simonsson Date: Sat, 10 Jun 2017 20:41:50 +0200 Subject: Fix crash in join handling in inputfilter Make sure to check size of parameter list for extended join. BUG:378854 --- src/irc/inputfilter.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/irc/inputfilter.cpp b/src/irc/inputfilter.cpp index 53f3b2c..f273d30 100644 --- a/src/irc/inputfilter.cpp +++ b/src/irc/inputfilter.cpp @@ -575,21 +575,14 @@ void InputFilter::parseClientCommand(const QString &prefix, const QString &comma QString account; QString realName; - if (!m_server->hasExtendedJoin()) - { - channelName = trailing; - // Sometimes JOIN comes without ":" in front of the channel name - } - else + channelName = parameterList[0]; + + if (m_server->hasExtendedJoin() && plHas(3)) { - channelName = parameterList[0]; - account = parameterList[1]; - realName = parameterList[2]; + if (parameterList[1] != "*") + account = parameterList[1]; - if (account == "*") - { - account = QString(); - } + realName = parameterList[2]; } // Did we join the channel, or was it someone else? -- cgit v0.11.2