mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/mdns_null_deref_fuzzer_v4.3' into 'release/v4.3'
mdns: Fix potential null deref reported by fuzzer test(v4.3) See merge request espressif/esp-idf!17146
This commit is contained in:
commit
f75ed7c7cc
@ -2484,7 +2484,8 @@ static bool _mdns_question_matches(mdns_parsed_question_t * question, uint16_t t
|
||||
if (type == MDNS_TYPE_A || type == MDNS_TYPE_AAAA) {
|
||||
return true;
|
||||
} else if (type == MDNS_TYPE_PTR || type == MDNS_TYPE_SDPTR) {
|
||||
if (!strcasecmp(service->service->service, question->service)
|
||||
if (question->service && question->proto && question->domain
|
||||
&& !strcasecmp(service->service->service, question->service)
|
||||
&& !strcasecmp(service->service->proto, question->proto)
|
||||
&& !strcasecmp(MDNS_DEFAULT_DOMAIN, question->domain)) {
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user