irc: fix crash when receiving a malformed message 352 (who)

Thanks to Stuart Nevans Locke for reporting the issue.
v2.8-utf8proc
Sébastien Helleu 2020-02-10 07:37:11 +01:00
parent 40ccacb433
commit 9904cb6d2e
2 changed files with 2 additions and 1 deletions

View File

@ -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)

View File

@ -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;