security: add missing NULL checks after reply_new in stream creation

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Wim Taymans 2026-04-30 10:23:07 +02:00
parent f29a4e6e14
commit 4ddedc72cd

View file

@ -586,6 +586,8 @@ static int reply_create_playback_stream(struct stream *stream, struct pw_manager
client->name, stream->create_tag, stream->index, missing, lat_usec); client->name, stream->create_tag, stream->index, missing, lat_usec);
reply = reply_new(client, stream->create_tag); reply = reply_new(client, stream->create_tag);
if (reply == NULL)
return -ENOMEM;
message_put(reply, message_put(reply,
TAG_U32, stream->channel, /* stream index/channel */ TAG_U32, stream->channel, /* stream index/channel */
TAG_U32, stream->index, /* sink_input/stream index */ TAG_U32, stream->index, /* sink_input/stream index */
@ -742,6 +744,8 @@ static int reply_create_record_stream(struct stream *stream, struct pw_manager_o
client->name, stream->create_tag, stream->index, lat_usec); client->name, stream->create_tag, stream->index, lat_usec);
reply = reply_new(client, stream->create_tag); reply = reply_new(client, stream->create_tag);
if (reply == NULL)
return -ENOMEM;
message_put(reply, message_put(reply,
TAG_U32, stream->channel, /* stream index/channel */ TAG_U32, stream->channel, /* stream index/channel */
TAG_U32, stream->index, /* source_output/stream index */ TAG_U32, stream->index, /* source_output/stream index */