mirror of
https://github.com/espressif/esp-lwip.git
synced 2025-08-06 18:23:42 +08:00
dns: Fix server_idx increasing to DNS_MAX_SERVERS and trigger the LWIP_ASSERT
Closes https://github.com/espressif/esp-idf/issues/6878
This commit is contained in:
@ -1089,8 +1089,8 @@ dns_check_entry(u8_t i)
|
|||||||
entry->tmr = 1;
|
entry->tmr = 1;
|
||||||
entry->retries = 0;
|
entry->retries = 0;
|
||||||
#if ESP_DNS
|
#if ESP_DNS
|
||||||
while((entry->server_idx < DNS_MAX_SERVERS) && ip_addr_isany_val(dns_servers[entry->server_idx])) {
|
while((entry->server_idx + 1 < DNS_MAX_SERVERS) && ip_addr_isany_val(dns_servers[entry->server_idx])) {
|
||||||
entry->server_idx++;
|
entry->server_idx ++;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* send DNS packet for this entry */
|
/* send DNS packet for this entry */
|
||||||
|
Reference in New Issue
Block a user