]> jfr.im git - irc/quakenet/newserv.git/blobdiff - lib/irc_ipv6.c
build: Clean up workspaces code a bit.
[irc/quakenet/newserv.git] / lib / irc_ipv6.c
index 82d567264bc98e46efb8470e0bc40d38c6dd1e8c..6f44d0bfa3df1fe309f35e455a75104d6c369cfa 100644 (file)
@@ -247,6 +247,8 @@ ipmask_parse(const char *input, struct irc_in_addr *ip, unsigned char *pbits)
     default:
       return 0;
     }
+    if (input[pos] != '\0')
+      return 0;
   finish:
     if (colon < 8) {
       unsigned int jj;
@@ -413,7 +415,6 @@ const char* iptobase64(char* buf, const struct irc_in_addr* addr, unsigned int c
     if (curr_zeros > max_zeros) {
       max_start = ii - curr_zeros;
       max_zeros = curr_zeros;
-      curr_zeros = 0;
     }
     /* Print the rest of the address */
     for (ii = zero; ii < 8; ) {