mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-24 23:25:58 +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;
|
return 0;
|
||||||
}
|
}
|
||||||
if (s[1] == ':') {
|
if (s[1] == ':') {
|
||||||
|
if (s[2] == ':') {
|
||||||
|
/* invalid format: three successive colons */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
s++;
|
s++;
|
||||||
/* "::" found, set zeros */
|
/* "::" found, set zeros */
|
||||||
while (zero_blocks > 0) {
|
while (zero_blocks > 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user