mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-29 21:37:54 -04:00
security: fix division by zero in PulseAudio set_stream_buffer_attr
A client can create a stream with invalid sample_spec (rate=0) via format_info negotiation, then send SET_STREAM_BUFFER_ATTR before negotiation completes. fix_playback_buffer_attr divides by ss.rate, crashing the daemon. Reject buffer attr changes on streams that have not completed format negotiation. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
e5968c00b1
commit
5709f05597
1 changed files with 1 additions and 1 deletions
|
|
@ -4518,7 +4518,7 @@ static int do_set_stream_buffer_attr(struct client *client, uint32_t command, ui
|
|||
commands[command].name, tag, channel);
|
||||
|
||||
stream = pw_map_lookup(&client->streams, channel);
|
||||
if (stream == NULL)
|
||||
if (stream == NULL || stream->create_tag != SPA_ID_INVALID)
|
||||
return -ENOENT;
|
||||
|
||||
if (command == COMMAND_SET_PLAYBACK_STREAM_BUFFER_ATTR) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue