]> arthur.barton.de Git - ngircd-alex.git/commit
Send_Message: Fix handling of "empty" targets
authorAlexander Barton <alex@barton.de>
Thu, 7 Jan 2016 00:54:11 +0000 (01:54 +0100)
committerAlexander Barton <alex@barton.de>
Thu, 7 Jan 2016 00:54:11 +0000 (01:54 +0100)
commit7dba1a0766b35d01cd8892753d1e0dd578ca2cd9
tree441f1cf5edec25aad623117d8924e54e48447012
parent055d6e80561cc56fd2218c7698b3063931c8c17e
Send_Message: Fix handling of "empty" targets

Clients can specify multiple targets for the "PRIVMSG", "NOTICE", and
"SQUERY" commands, separated by commas (e. g. "PRIVMSG a,#b,c :text").

Since commit 49ab79d0 ("Limit the number of message targes, and suppress
duplicates"), ngIRCd crashed when the client sent the separator character
only as target(s), e. g. "," or ",,,," etc.!

This patch fixes the bug and adds a test case for this issue.

Thanks to Florian Westphal <fw@strlen.de> for spotting the issue!
src/ngircd/irc.c
src/testsuite/message-test.e