security: add missing NULL check in PulseAudio message_dump

pw_properties_new can return NULL on OOM. Passing NULL to read_props
causes a NULL pointer dereference through pw_properties_set. Only
reachable when debug logging is enabled.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Wim Taymans 2026-04-29 16:44:01 +02:00
parent 9c1bc64af4
commit 5f02641859

View file

@ -788,8 +788,10 @@ int message_dump(enum spa_log_level level, const char *prefix, struct message *m
}
case TAG_PROPLIST:
{
struct pw_properties *props = pw_properties_new(NULL, NULL);
const struct spa_dict_item *it;
struct pw_properties *props = pw_properties_new(NULL, NULL);
if (props == NULL)
return -errno;
res = read_props(m, props, false);
if (res >= 0) {
pw_log(level, "%s %u: props: n_items:%u", prefix, o, props->dict.n_items);