diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-07-18 19:08:24 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-07-18 19:08:24 +0200 |
commit | 5d5d2ce4d1abc19df10c83da5c214495c610fbd1 (patch) | |
tree | 8ab07922048d527fb5fc49d9871ce28bf62a4000 /src/plugins/irc | |
parent | 10024571efc49e470333b2d90aba3220a17eec5a (diff) | |
download | weechat-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.c | 5 |
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; |