X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=ircd%2Fircd_string.c;h=ed0349ea45fc20b1d8700cc80c355b82317c0603;hb=refs%2Fheads%2Fupstream;hp=f27db15c4b4184bcfba87731b0f0e873b5ce9d14;hpb=2cf13869e6194d21a1f245aa251b33cb03b77bb6;p=ircu2.10.12-pk.git diff --git a/ircd/ircd_string.c b/ircd/ircd_string.c index f27db15..ed0349e 100644 --- a/ircd/ircd_string.c +++ b/ircd/ircd_string.c @@ -578,6 +578,8 @@ ipmask_parse(const char *input, struct irc_in_addr *ip, unsigned char *pbits) if (input[pos] == ':') { if (colon < 8) return 0; + if (ii == 8) + return 0; colon = ii; pos++; } @@ -609,6 +611,8 @@ ipmask_parse(const char *input, struct irc_in_addr *ip, unsigned char *pbits) while (input[++pos] == '*' || input[pos] == ':') ; if (input[pos] != '\0' || colon < 8) return 0; + if (part && ii < 8) + ip->in6_16[ii++] = htons(part); if (pbits) *pbits = ii * 16; return pos;