Skip to content

Commit

Permalink
irc: fix crash when receiving a malformed message 352 (who)
Browse files Browse the repository at this point in the history
Thanks to Stuart Nevans Locke for reporting the issue.
  • Loading branch information
flashcode committed Feb 10, 2020
1 parent 40ccacb commit 9904cb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog.adoc
Expand Up @@ -31,6 +31,7 @@ Bug fixes::
* core: fix memory leak in completion
* core: flush stdout/stderr before forking in hook_process function (issue #1441)
* core: fix evaluation of condition with nested "if" (issue #1434)
* irc: fix crash when receiving a malformed message 352 (who)
* irc: fix crash when a new message 005 is received with longer nick prefixes
* irc: fix crash when receiving a malformed message 324 (channel mode)
* irc: add nick changes in the hotlist (except self nick change)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/irc/irc-protocol.c
Expand Up @@ -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;
Expand Down

2 comments on commit 9904cb6

@setharnold
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this have a CVE number? If not, has anyone applied for one yet?

Thanks

@flashcode
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@setharnold: it's in progress, I'll put the CVE id as soon as possible on the security page: https://weechat.org/doc/security/

Please sign in to comment.