summaryrefslogtreecommitdiff
path: root/src/plugins/irc
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-01-02 21:43:32 +0100
committerSebastien Helleu <flashcode@flashtux.org>2011-01-02 21:43:32 +0100
commit77852924285aa7fc2e5b5110833495799b28803c (patch)
treec7b6a34f36d5ad097e94ee4e376eda8ba7ca75aa /src/plugins/irc
parentc466b5e1b1f33577778cd9a47ad8110411380131 (diff)
downloadweechat-77852924285aa7fc2e5b5110833495799b28803c.zip
Fix crash with malformed IRC message "324" received
Diffstat (limited to 'src/plugins/irc')
-rw-r--r--src/plugins/irc/irc-protocol.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 313656526..61b768457 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -2520,7 +2520,8 @@ IRC_PROTOCOL_CALLBACK(324)
argv[3],
IRC_COLOR_CHAT_DELIMITERS,
IRC_COLOR_CHAT,
- (argv_eol[4][0] == ':') ? argv_eol[4] + 1 : argv_eol[4],
+ (argc > 4) ?
+ ((argv_eol[4][0] == ':') ? argv_eol[4] + 1 : argv_eol[4]) : "",
IRC_COLOR_CHAT_DELIMITERS);
}