mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-03 06:47:04 -04:00
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:
parent
9c1bc64af4
commit
5f02641859
1 changed files with 3 additions and 1 deletions
|
|
@ -788,8 +788,10 @@ int message_dump(enum spa_log_level level, const char *prefix, struct message *m
|
||||||
}
|
}
|
||||||
case TAG_PROPLIST:
|
case TAG_PROPLIST:
|
||||||
{
|
{
|
||||||
struct pw_properties *props = pw_properties_new(NULL, NULL);
|
|
||||||
const struct spa_dict_item *it;
|
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);
|
res = read_props(m, props, false);
|
||||||
if (res >= 0) {
|
if (res >= 0) {
|
||||||
pw_log(level, "%s %u: props: n_items:%u", prefix, o, props->dict.n_items);
|
pw_log(level, "%s %u: props: n_items:%u", prefix, o, props->dict.n_items);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue