mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-30 18:57:28 +02:00
Merge pull request #744 from andrew-lifx/fix/mdns_append_fqdn
fix(mdns): Fix _mdns_append_fqdn excessive stack usage (IDFGH-14506)
This commit is contained in:
@ -751,12 +751,12 @@ static uint16_t _mdns_append_fqdn(uint8_t *packet, uint16_t *index, const char *
|
|||||||
//empty string so terminate
|
//empty string so terminate
|
||||||
return _mdns_append_u8(packet, index, 0);
|
return _mdns_append_u8(packet, index, 0);
|
||||||
}
|
}
|
||||||
mdns_name_t name;
|
|
||||||
static char buf[MDNS_NAME_BUF_LEN];
|
static char buf[MDNS_NAME_BUF_LEN];
|
||||||
uint8_t len = strlen(strings[0]);
|
uint8_t len = strlen(strings[0]);
|
||||||
//try to find first the string length in the packet (if it exists)
|
//try to find first the string length in the packet (if it exists)
|
||||||
uint8_t *len_location = (uint8_t *)memchr(packet, (char)len, *index);
|
uint8_t *len_location = (uint8_t *)memchr(packet, (char)len, *index);
|
||||||
while (len_location) {
|
while (len_location) {
|
||||||
|
mdns_name_t name;
|
||||||
//check if the string after len_location is the string that we are looking for
|
//check if the string after len_location is the string that we are looking for
|
||||||
if (memcmp(len_location + 1, strings[0], len)) { //not continuing with our string
|
if (memcmp(len_location + 1, strings[0], len)) { //not continuing with our string
|
||||||
search_next:
|
search_next:
|
||||||
|
Reference in New Issue
Block a user