security: add missing NULL check after pw_properties_new in zeroconf

pw_properties_new can return NULL under OOM. The result was used
directly without a check, leading to a NULL pointer dereference.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Wim Taymans 2026-04-30 09:25:19 +02:00
parent e1f4c441f4
commit 912f7f5c64

View file

@ -241,6 +241,8 @@ static void fill_service_data(struct module_zeroconf_publish_data *d, struct ser
s->cm = dev_info.map;
s->props = pw_properties_new(NULL, NULL);
if (s->props == NULL)
return;
txt_record_server_data(s->userdata->manager->info, s->props);