diff --git a/src/core/ipv6/ip6_addr.c b/src/core/ipv6/ip6_addr.c index d11e8095..1717e481 100644 --- a/src/core/ipv6/ip6_addr.c +++ b/src/core/ipv6/ip6_addr.c @@ -107,6 +107,10 @@ ip6addr_aton(const char *cp, ip6_addr_t *addr) return 0; } if (s[1] == ':') { + if (s[2] == ':') { + /* invalid format: three successive colons */ + return 0; + } s++; /* "::" found, set zeros */ while (zero_blocks > 0) {