mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-10 23:50:21 -04:00
zeroconf: check for NULL before doing strdup
Reject zeroconf entries without name, type, domain or host_name.
This commit is contained in:
parent
f57a2e9680
commit
620b18e9d8
1 changed files with 4 additions and 0 deletions
|
|
@ -178,6 +178,10 @@ static struct service *service_new(struct entry *e,
|
|||
s->e = e;
|
||||
spa_list_append(&e->services, &s->link);
|
||||
|
||||
if (info->name == NULL || info->type == NULL ||
|
||||
info->domain == NULL || info->host_name == NULL)
|
||||
goto error;
|
||||
|
||||
s->info.interface = info->interface;
|
||||
s->info.protocol = info->protocol;
|
||||
s->info.name = strdup(info->name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue