Fix SF#1706014 by not giving in-burst servers special lenience.
[ircu2.10.12-pk.git] / ircd / ircd_string.c
index bfdceb5aac22c8bec4f660bab9e5c5865621fcc5..a9d945138aed394032ca597bb9d291b1d79e625f 100644 (file)
@@ -156,6 +156,8 @@ char* ircd_strncpy(char* s1, const char* s2, size_t n)
 
   while (s < endp && (*s++ = *s2++))
     ;
+  if (s == endp)
+    *s = '\0';
   return s1;
 }
 
@@ -628,7 +630,7 @@ ipmask_parse(const char *input, struct irc_in_addr *ip, unsigned char *pbits)
         ip->in6_16[colon + jj] = 0;
     }
     return pos;
-  } else if (dot) {
+  } else if (dot || strchr(input, '/')) {
     unsigned int addr;
     int len = ircd_aton_ip4(input, &addr, pbits);
     if (len) {