summaryrefslogtreecommitdiff
path: root/src/plugins/irc
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-07-18 19:08:24 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-07-18 19:08:24 +0200
commit5d5d2ce4d1abc19df10c83da5c214495c610fbd1 (patch)
tree8ab07922048d527fb5fc49d9871ce28bf62a4000 /src/plugins/irc
parent10024571efc49e470333b2d90aba3220a17eec5a (diff)
downloadweechat-5d5d2ce4d1abc19df10c83da5c214495c610fbd1.zip
irc: fix crash when malformed IRC message 352 (WHO) is received (bug #33790)
Diffstat (limited to 'src/plugins/irc')
-rw-r--r--src/plugins/irc/irc-protocol.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index f65e5537f..766692799 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -3395,9 +3395,10 @@ IRC_PROTOCOL_CALLBACK(352)
* :server 352 mynick #channel user host server nick (*) (H/G) :0 flashcode
*/
- IRC_PROTOCOL_MIN_ARGS(9);
-
arg_start = (strcmp (argv[8], "*") == 0) ? 9 : 8;
+
+ IRC_PROTOCOL_MIN_ARGS(arg_start + 1);
+
if (argv[arg_start][0] == ':')
{
pos_attr = NULL;