From 98d2c1a0736e715ad5d433dfb3d51d101475a4c6 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Fri, 3 May 2019 16:37:43 +0200 Subject: [PATCH] mdns: fixed mdns crashing on reception of txt packet without a corresponding service closes #2866 * Original commit: espressif/esp-idf@af48977f21cea6b18dae10b2c8b64a78acfc647f --- components/mdns/mdns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mdns/mdns.c b/components/mdns/mdns.c index 8c9767942..e88672f82 100644 --- a/components/mdns/mdns.c +++ b/components/mdns/mdns.c @@ -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) {