]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Don't accept gline masks that are too long.
authorGunnar Beutner <redacted>
Mon, 15 Jul 2013 14:49:13 +0000 (16:49 +0200)
committerGunnar Beutner <redacted>
Mon, 15 Jul 2013 14:49:13 +0000 (16:49 +0200)
--HG--
branch : shroudtrusts

glines/glines_formats.c

index 6f98b6f3f9f5f6ee74eee8a3502f432739b4b3ea..c65bb1d348c5667b3c1bd271a5874fdf291679a5 100644 (file)
@@ -61,6 +61,10 @@ gline *makegline(const char *mask) {
   if (strchr(mask, ' ') != NULL)
     return NULL;
 
+  /* Make sure it's not too long */
+  if (strlen(mask) > NICKLEN + USERLEN + HOSTLEN + 2)
+    return NULL;
+
   gl = newgline();
 
   if (!gl) {