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:
David Cermak
2026-05-27 15:06:07 +02:00
parent db13094c94
commit fa84ee6e4e
+1 -1
View File
@@ -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;
}