]> granicus.if.org Git - esp-idf/commitdiff
mdns: fixed mdns crashing on reception of txt packet without a corresponding service
authorDavid Cermak <cermak@espressif.com>
Fri, 3 May 2019 14:37:43 +0000 (16:37 +0200)
committerDavid Cermak <cermak@espressif.com>
Fri, 3 May 2019 14:37:43 +0000 (16:37 +0200)
closes #2866

components/mdns/mdns.c

index 8c9767942a17acf9903067e45925cecf672f0a30..e88672f82b8b8ebcfcac61798505625d7db0a876 100644 (file)
@@ -2886,7 +2886,7 @@ void mdns_parse_packet(mdns_rx_packet_t * packet)
                         col = 1;
                     } else if (!clas) {
                         col = -1;
-                    } else {
+                    } else if (service) { // only detect txt collision if service existed
                         col = _mdns_check_txt_collision(service->service, data_ptr, data_len);
                     }
                     if (col && !_mdns_server->interfaces[packet->tcpip_if].pcbs[packet->ip_protocol].probe_running) {