mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +00:00
fixed bug #46072: ip4addr_aton() does not check the number range of all address parts
This commit is contained in:
parent
f89e859415
commit
927b72abd2
@ -274,6 +274,10 @@ HISTORY
|
||||
|
||||
++ Bugfixes:
|
||||
|
||||
2015-09-30: Simon Goldschmidt
|
||||
* ip4_addr.c: fixed bug #46072: ip4addr_aton() does not check the number range
|
||||
of all address parts
|
||||
|
||||
2015-08-28: Simon Goldschmidt
|
||||
* tcp.c, tcp_in.c: fixed bug #44023: TCP ssthresh value is unclear: ssthresh
|
||||
is set to the full send window for active open, too, and is updated once
|
||||
|
@ -230,6 +230,9 @@ ip4addr_aton(const char *cp, ip4_addr_t *addr)
|
||||
if (val > 0xffffffUL) {
|
||||
return 0;
|
||||
}
|
||||
if (parts[0] > 0xff) {
|
||||
return 0;
|
||||
}
|
||||
val |= parts[0] << 24;
|
||||
break;
|
||||
|
||||
@ -237,6 +240,9 @@ ip4addr_aton(const char *cp, ip4_addr_t *addr)
|
||||
if (val > 0xffff) {
|
||||
return 0;
|
||||
}
|
||||
if ((parts[0] > 0xff) || (parts[1] > 0xff)) {
|
||||
return 0;
|
||||
}
|
||||
val |= (parts[0] << 24) | (parts[1] << 16);
|
||||
break;
|
||||
|
||||
@ -244,6 +250,9 @@ ip4addr_aton(const char *cp, ip4_addr_t *addr)
|
||||
if (val > 0xff) {
|
||||
return 0;
|
||||
}
|
||||
if ((parts[0] > 0xff) || (parts[1] > 0xff) || (parts[2] > 0xff)) {
|
||||
return 0;
|
||||
}
|
||||
val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user