mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-22 14:57:30 +02:00
components/mdns: wrong Message compression detect
Old behavior assumes message compressed when any of 2 most significant bits are set, But in fact Message compressed only when both those bits are set to 1. Also maximal label length should be 63 bytes. * Original commit: espressif/esp-idf@6e24566186
This commit is contained in:
committed by
suren-gabrielyan-espressif
parent
907e7ee29e
commit
00a72b8920
@ -555,9 +555,9 @@ static const uint8_t * _mdns_read_fqdn(const uint8_t * packet, const uint8_t * s
|
||||
return NULL;
|
||||
}
|
||||
uint8_t len = start[index++];
|
||||
if ((len & 0xC0) == 0) {
|
||||
if (len > 64) {
|
||||
//length can not be more than 64
|
||||
if (len < 0xC0) {
|
||||
if (len > 63) {
|
||||
//length can not be more than 63
|
||||
return NULL;
|
||||
}
|
||||
uint8_t i;
|
||||
|
Reference in New Issue
Block a user