summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-protocol.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-10-03 15:37:35 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-10-03 15:37:35 +0200
commite93647db953dc97d465e6729a479d24fa1837bd6 (patch)
tree7ac1e0795a0ba59f0a63527a1baa8825f3090fb5 /src/plugins/irc/irc-protocol.c
parentf2879b0572d772ab4a50fbd98c7bb5c05a38aaa7 (diff)
downloadweechat-e93647db953dc97d465e6729a479d24fa1837bd6.zip
irc: fix crash on malformed irc notice received (without message after target)
Diffstat (limited to 'src/plugins/irc/irc-protocol.c')
-rw-r--r--src/plugins/irc/irc-protocol.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 7a530a3e7..f8c5684da 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -961,6 +961,8 @@ IRC_PROTOCOL_CALLBACK(notice)
if (argv[0][0] == ':')
{
+ if (argc < 4)
+ return WEECHAT_RC_ERROR;
pos_target = argv[2];
if ((pos_target[0] == '@') && (irc_channel_is_channel (pos_target + 1)))
{