Skip to content

Commit 2e7d240

Browse files
authored
Merge pull request #744 from andrew-lifx/fix/mdns_append_fqdn
fix(mdns): Fix _mdns_append_fqdn excessive stack usage (IDFGH-14506)
2 parents d4a004b + bd23c23 commit 2e7d240

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/mdns/mdns.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,12 +751,12 @@ static uint16_t _mdns_append_fqdn(uint8_t *packet, uint16_t *index, const char *
751751
//empty string so terminate
752752
return _mdns_append_u8(packet, index, 0);
753753
}
754-
mdns_name_t name;
755754
static char buf[MDNS_NAME_BUF_LEN];
756755
uint8_t len = strlen(strings[0]);
757756
//try to find first the string length in the packet (if it exists)
758757
uint8_t *len_location = (uint8_t *)memchr(packet, (char)len, *index);
759758
while (len_location) {
759+
mdns_name_t name;
760760
//check if the string after len_location is the string that we are looking for
761761
if (memcmp(len_location + 1, strings[0], len)) { //not continuing with our string
762762
search_next:

0 commit comments

Comments
 (0)