summaryrefslogtreecommitdiff
path: root/net-irc/konversation/files/konversation-1.7.2-extjoin-crash.patch
blob: 97fc4c1494c27e16bf374cce0167851b5a30478f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From 783dc0f595ecf90e37225a57da0ffa2c030a470d Mon Sep 17 00:00:00 2001
From: Peter Simonsson <peter.simonsson@gmail.com>
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