]> jfr.im git - irc/UndernetIRC/iauthd-c.git/commitdiff
irc_pton: Always fail for patterns like a::b:*
authorMichael Poole <redacted>
Sun, 14 Mar 2021 17:31:30 +0000 (13:31 -0400)
committerMichael Poole <redacted>
Sun, 14 Mar 2021 17:34:48 +0000 (13:34 -0400)
That alternative is to parse that just like "a::b" with trailing text,
which seems prone to surprisign behavior.

modules/iauth_misc.c

index bd8444553094fa94a03f037a9c1b26036f0b9763..672a0f1f66b8b1cdb2a8c04db89c1c854baa655c 100644 (file)
@@ -232,7 +232,7 @@ unsigned int irc_pton(irc_inaddr *addr, unsigned int *bits, const char *input, i
         case '*':
             while (input[++pos] == '*') ;
             if (input[pos] != '\0' || cpos < 8)
-                return allow_trailing ? pos : 0;
+                return 0;
             if (bits)
                 *bits = ii * 16;
             return pos;