mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-29 00:32:51 +00:00
ip6addr_aton(): fail on three successive colons in an IPv6 address string
This commit is contained in:
parent
5a185a0fbd
commit
0621e8d1b1
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user