Skip to content

Commit bb4f37f

Browse files
committed
fix(mdns): Reverting "Fix parsing incorrect txt records"
This reverts commit 8fd2c99.
1 parent 708d49f commit bb4f37f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

components/mdns/mdns.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3593,7 +3593,7 @@ static void _mdns_result_txt_create(const uint8_t *data, size_t len, mdns_txt_it
35933593
}
35943594

35953595
int name_len = _mdns_txt_item_name_get_len(data + i, partLen);
3596-
if (name_len < 0 || txt_num >= num_items) {//invalid item (no name or more items than expected)
3596+
if (name_len < 0) {//invalid item (no name)
35973597
i += partLen;
35983598
continue;
35993599
}
@@ -3602,6 +3602,7 @@ static void _mdns_result_txt_create(const uint8_t *data, size_t len, mdns_txt_it
36023602
HOOK_MALLOC_FAILED;
36033603
goto handle_error;//error
36043604
}
3605+
36053606
mdns_txt_item_t *t = &txt[txt_num];
36063607
uint8_t *value_len = &txt_value_len[txt_num];
36073608
txt_num++;
@@ -3623,8 +3624,6 @@ static void _mdns_result_txt_create(const uint8_t *data, size_t len, mdns_txt_it
36233624
*value_len = new_value_len;
36243625
i += new_value_len;
36253626
t->value = value;
3626-
} else {
3627-
t->value = NULL;
36283627
}
36293628
}
36303629

0 commit comments

Comments
 (0)