mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-29 10:17:30 +02:00
prevent crash when hostname is null
This commit is contained in:
@ -2801,7 +2801,8 @@ static int _mdns_check_aaaa_collision(esp_ip6_addr_t * ip, mdns_if_t tcpip_if)
|
|||||||
|
|
||||||
static bool _hostname_is_ours(const char * hostname)
|
static bool _hostname_is_ours(const char * hostname)
|
||||||
{
|
{
|
||||||
if (strcasecmp(hostname, _mdns_server->hostname) == 0) {
|
if (!_str_null_or_empty(_mdns_server->hostname) &&
|
||||||
|
strcasecmp(hostname, _mdns_server->hostname) == 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
mdns_host_item_t * host = _mdns_host_list;
|
mdns_host_item_t * host = _mdns_host_list;
|
||||||
|
Reference in New Issue
Block a user