From 5d5d2ce4d1abc19df10c83da5c214495c610fbd1 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Mon, 18 Jul 2011 19:08:24 +0200 Subject: irc: fix crash when malformed IRC message 352 (WHO) is received (bug #33790) --- src/plugins/irc/irc-protocol.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins/irc') 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; -- cgit v1.2.3