mirror of
https://github.com/espressif/esp-protocols.git
synced 2026-07-05 16:10:46 +02:00
fix(mdns): reject packets shorter than the DNS header
Packets with 11 bytes passed the old length check but caused a read past the RX buffer when loading the additional RR count field.
This commit is contained in:
@@ -637,7 +637,7 @@ static void mdns_parse_packet(mdns_rx_packet_t *packet)
|
||||
#endif // CONFIG_MDNS_SKIP_SUPPRESSING_OWN_QUERIES
|
||||
|
||||
// Check for the minimum size of mdns packet
|
||||
if (len <= MDNS_HEAD_ADDITIONAL_OFFSET) {
|
||||
if (len < MDNS_HEAD_LEN) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user