summaryrefslogtreecommitdiff
path: root/src/plugins/irc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2020-02-10 07:37:11 +0100
committerSébastien Helleu <flashcode@flashtux.org>2020-02-10 07:37:11 +0100
commit9904cb6d2eb40f679d8ff6557c22d53a3e3dc75a (patch)
tree88c27d8cd26517d1e42b5d5c277516f07e5bfc88 /src/plugins/irc
parent40ccacb4330a64802b1f1e28ed9a6b6d3ca9197f (diff)
downloadweechat-9904cb6d2eb40f679d8ff6557c22d53a3e3dc75a.zip
irc: fix crash when receiving a malformed message 352 (who)
Thanks to Stuart Nevans Locke for reporting the issue.
Diffstat (limited to 'src/plugins/irc')
-rw-r--r--src/plugins/irc/irc-protocol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 05433d34e..9238e8802 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -4689,7 +4689,7 @@ IRC_PROTOCOL_CALLBACK(352)
if (argc > 8)
{
- arg_start = (strcmp (argv[8], "*") == 0) ? 9 : 8;
+ arg_start = ((argc > 9) && (strcmp (argv[8], "*") == 0)) ? 9 : 8;
if (argv[arg_start][0] == ':')
{
pos_attr = NULL;