mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-03 21:32:08 +00:00
Fixed overflow in tcp_new_port() after changing port range to IANA "Dynamic and/or Private Ports" range
This commit is contained in:
parent
80b344e9fc
commit
e4739da961
@ -619,7 +619,7 @@ tcp_new_port(void)
|
||||
static u16_t port = TCP_LOCAL_PORT_RANGE_START;
|
||||
|
||||
again:
|
||||
if (++port > TCP_LOCAL_PORT_RANGE_END) {
|
||||
if (port++ >= TCP_LOCAL_PORT_RANGE_END) {
|
||||
port = TCP_LOCAL_PORT_RANGE_START;
|
||||
}
|
||||
/* Check all PCB lists. */
|
||||
|
Loading…
Reference in New Issue
Block a user