Skip to content

Commit

Permalink
mdns: add bound check when setting interface as duplicate
Browse files Browse the repository at this point in the history
Closes IDF-2787

Partially addresses espressif/esp-idf#6440


* Original commit: espressif/esp-idf@2b9d2c0
  • Loading branch information
suren-gabrielyan-espressif committed May 27, 2022
1 parent a6b8aca commit 8cb03d2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/mdns/mdns.c
Original file line number Diff line number Diff line change
Expand Up @@ -2202,6 +2202,9 @@ static void _mdns_dup_interface(mdns_if_t tcpip_if)
{
uint8_t i;
mdns_if_t other_if = _mdns_get_other_if (tcpip_if);
if (other_if == MDNS_IF_MAX) {
return; // no other interface found
}
for (i=0; i<MDNS_IP_PROTOCOL_MAX; i++) {
if (_mdns_server->interfaces[other_if].pcbs[i].pcb) {
//stop this interface and mark as dup
Expand Down

0 comments on commit 8cb03d2

Please sign in to comment.