mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-19 05:22:21 +02:00
mdns: Fix potential read behind parsed packet
* Original commit: espressif/esp-idf@51a5de2525
This commit is contained in:
committed by
suren-gabrielyan-espressif
parent
7710ea9a11
commit
e5a3a3df1d
@ -91,6 +91,7 @@ def mdns_server(esp_host):
|
||||
console_log('Received query: {} '.format(dns.__repr__()))
|
||||
sock.sendto(get_dns_answer_to_mdns_lwip(TESTER_NAME_LWIP, dns.id), addr)
|
||||
if len(dns.an) > 0 and dns.an[0].type == dpkt.dns.DNS_A:
|
||||
console_log('Received answer from {}'.format(dns.an[0].name))
|
||||
if dns.an[0].name == esp_host + u'.local':
|
||||
console_log('Received answer to esp32-mdns query: {}'.format(dns.__repr__()))
|
||||
esp_answered.set()
|
||||
|
Reference in New Issue
Block a user