]> arthur.barton.de Git - ngircd.git/commitdiff
RFC 2812, sec. 3.3.1: really check for the last dot
authorAlexander Barton <alex@barton.de>
Tue, 20 Jan 2009 15:49:34 +0000 (16:49 +0100)
committerAlexander Barton <alex@barton.de>
Tue, 20 Jan 2009 15:49:34 +0000 (16:49 +0100)
This fixes commit 5a3128243f4b60 and makes the test suite ("make check")
run again without errors.

src/ngircd/irc.c

index a0dc0ea9b8ed2b3722b736af9cf80575eab85627..2466b6bf9e47ef9ed7c084fe0a2af93a6570cf0f 100644 (file)
@@ -516,7 +516,7 @@ Send_Message_Mask(CLIENT * from, char * command, char * targetMask,
         * RFC 2812, sec. 3.3.1 requires that targetMask have at least one
         * dot (".") and no wildcards ("*", "?") following the last one.
         */
-       check_wildcards = strchr(targetMask, '.');
+       check_wildcards = strrchr(targetMask, '.');
        assert(check_wildcards != NULL);
        if (check_wildcards &&
                check_wildcards[strcspn(check_wildcards, "*?")])