Skip to content

Commit

Permalink
dns: Fix server_idx increasing to DNS_MAX_SERVERS and trigger the LWI…
Browse files Browse the repository at this point in the history
…P_ASSERT

ESP specific patch

Picked from 5a567d52
Ref IDF-4839
  • Loading branch information
ESP-YJM authored and david-cermak committed Aug 16, 2022
1 parent 223101f commit 9247429
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -1073,8 +1073,8 @@ dns_check_entry(u8_t i)
entry->tmr = 1;
entry->retries = 0;
#if ESP_DNS
while((entry->server_idx < DNS_MAX_SERVERS) && ip_addr_isany_val(dns_servers[entry->server_idx])) {
entry->server_idx++;
while((entry->server_idx + 1 < DNS_MAX_SERVERS) && ip_addr_isany_val(dns_servers[entry->server_idx])) {
entry->server_idx ++;
}
#endif
/* send DNS packet for this entry */
Expand Down

0 comments on commit 9247429

Please sign in to comment.