mdns: Fix potential null deref for ANY query type

This commit is contained in:
David Cermak 2021-12-17 15:17:58 +01:00 committed by David Čermák
parent f010729e74
commit 99dd8eedb1

View File

@ -4170,7 +4170,7 @@ static mdns_search_once_t * _mdns_search_find_from(mdns_search_once_t * s, mdns_
continue;
}
if (s->type != MDNS_TYPE_PTR) {
if (!strcasecmp(name->host, s->instance)) {
if (s->instance && strcasecmp(name->host, s->instance) == 0) {
return s;
}
s = s->next;