From 4ddedc72cda8baca0f7370aa9671221e41fc0aeb Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 30 Apr 2026 10:23:07 +0200 Subject: [PATCH] security: add missing NULL checks after reply_new in stream creation Co-Authored-By: Claude Opus 4.7 --- src/modules/module-protocol-pulse/pulse-server.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index a432c0074..5191dd6b4 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -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); reply = reply_new(client, stream->create_tag); + if (reply == NULL) + return -ENOMEM; message_put(reply, TAG_U32, stream->channel, /* stream index/channel */ 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); reply = reply_new(client, stream->create_tag); + if (reply == NULL) + return -ENOMEM; message_put(reply, TAG_U32, stream->channel, /* stream index/channel */ TAG_U32, stream->index, /* source_output/stream index */