Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package pipewire for openSUSE:Factory 
checked in at 2026-05-16 19:24:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pipewire (Old)
 and      /work/SRC/openSUSE:Factory/.pipewire.new.1966 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pipewire"

Sat May 16 19:24:29 2026 rev:155 rq:1353103 version:1.6.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/pipewire/pipewire.changes        2026-04-29 
19:18:24.754479193 +0200
+++ /work/SRC/openSUSE:Factory/.pipewire.new.1966/pipewire.changes      
2026-05-16 19:25:27.108312773 +0200
@@ -1,0 +2,31 @@
+Wed May 13 21:07:07 UTC 2026 - Antonio Larrosa <[email protected]>
+
+- Update to version 1.6.5:
+  * This is a bugfix release that is API and ABI compatible with
+    the previous 1.6.x releases.
+  * Highlights
+    - Fix muted output in some cases.
+    - Removed the pipe filter in filter-graph.
+    - More fixes and improvements.
+  * PipeWire
+    - Fix an issue in pw-filter where it could end up in a loop
+      where buffers are stuck on a port and the port becomes
+      silent. (#5249 (closed))
+  * Modules
+    - Improve ROC receiver start/stop, fixes memory leaks.
+      (#5250 (closed))
+    - Remove the pipe filter from filter-graph, it's broken by
+      design and a security nightmare.
+    - Fix the midi buffer size in jack-tunnel.
+  * SPA
+    - Rate limit out-of-buffers errors. (#5249 (closed))
+    - Partially revert the line-out mute patch, it seems to break
+      things and leave audio muted when plugging-unplugging jacks.
+      (#5246)
+    - Improve renegotiation in audioconvert when the graph rate
+      changes and the resampler was disabled. (#4933 (closed)).
+    - Fix potential crash in alsa when logging.
+  * Pulse-server
+    - A whole bunch of extra security checks and hardening fixes.
+
+-------------------------------------------------------------------

Old:
----
  pipewire-1.6.4.tar.xz

New:
----
  pipewire-1.6.5.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pipewire.spec ++++++
--- /var/tmp/diff_new_pack.wIuEKR/_old  2026-05-16 19:25:28.356363947 +0200
+++ /var/tmp/diff_new_pack.wIuEKR/_new  2026-05-16 19:25:28.356363947 +0200
@@ -71,7 +71,7 @@
 %bcond_with aptx
 
 Name:           pipewire
-Version:        1.6.4
+Version:        1.6.5
 Release:        0
 Summary:        A Multimedia Framework designed to be an audio and video 
server and more
 License:        MIT

++++++ _service ++++++
--- /var/tmp/diff_new_pack.wIuEKR/_old  2026-05-16 19:25:28.404365915 +0200
+++ /var/tmp/diff_new_pack.wIuEKR/_new  2026-05-16 19:25:28.408366079 +0200
@@ -3,7 +3,7 @@
   <service name="obs_scm" mode="manual">
     <param name="scm">git</param>
     <param 
name="url">https://gitlab.freedesktop.org/pipewire/pipewire.git</param>
-    <param name="revision">1.6.4</param>
+    <param name="revision">1.6.5</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <!--
     <param name="revision">636cbae9b6cebc4ba55903e2a686f4c4a2bd4193</param>

++++++ pipewire-1.6.4.tar.xz -> pipewire-1.6.5.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/NEWS new/pipewire-1.6.5/NEWS
--- old/pipewire-1.6.4/NEWS     2026-04-22 10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/NEWS     2026-05-13 16:58:43.000000000 +0200
@@ -1,3 +1,38 @@
+# PipeWire 1.6.5 (2026-05-13)
+
+This is a bugfix release that is API and ABI compatible with the previous
+1.6.x releases.
+
+## Highlights
+  - Fix muted output in some cases.
+  - Removed the pipe filter in filter-graph.
+  - More fixes and improvements.
+
+
+## PipeWire
+  - Fix an issue in pw-filter where it could end up in a loop where buffers
+    are stuck on a port and the port becomes silent. (#5249)
+
+## Modules
+  - Improve ROC receiver start/stop, fixes memory leaks. (#5250)
+  - Remove the pipe filter from filter-graph, it's broken by design and a
+    security nightmare.
+  - Fix the midi buffer size in jack-tunnel.
+
+## SPA
+  - Rate limit out-of-buffers errors. (#5249)
+  - Partially revert the line-out mute patch, it seems to break things and 
leave
+    audio muted when plugging-unplugging jacks.  (#5246)
+  - Improve renegotiation in audioconvert when the graph rate changes and the
+    resampler was disabled. (#4933).
+  - Fix potential crash in alsa when logging.
+
+## Pulse-server
+  - A whole bunch of extra security checks and hardening fixes.
+
+
+Older versions:
+
 # PipeWire 1.6.4 (2026-04-22)
 
 This is a bugfix release that is API and ABI compatible with the previous
@@ -31,9 +66,6 @@
 ## Tools
   - Fix WAVEX saving in pw-cat. (#5233)
 
-
-Older versions:
-
 # PipeWire 1.6.3 (2026-04-09)
 
 This is a bugfix release that is API and ABI compatible with the previous
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/meson.build 
new/pipewire-1.6.5/meson.build
--- old/pipewire-1.6.4/meson.build      2026-04-22 10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/meson.build      2026-05-13 16:58:43.000000000 +0200
@@ -1,5 +1,5 @@
 project('pipewire', ['c' ],
-  version : '1.6.4',
+  version : '1.6.5',
   license : [ 'MIT', 'LGPL-2.1-or-later', 'GPL-2.0-only' ],
   meson_version : '>= 0.61.1',
   default_options : [ 'warning_level=3',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/pipewire-alsa/alsa-plugins/pcm_pipewire.c 
new/pipewire-1.6.5/pipewire-alsa/alsa-plugins/pcm_pipewire.c
--- old/pipewire-1.6.4/pipewire-alsa/alsa-plugins/pcm_pipewire.c        
2026-04-22 10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/pipewire-alsa/alsa-plugins/pcm_pipewire.c        
2026-05-13 16:58:43.000000000 +0200
@@ -1244,7 +1244,7 @@
        return size;
 }
 
-static cookie_io_functions_t io_funcs = {
+static const cookie_io_functions_t io_funcs = {
        .write = log_write,
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/spa/plugins/alsa/alsa-pcm.c 
new/pipewire-1.6.5/spa/plugins/alsa/alsa-pcm.c
--- old/pipewire-1.6.4/spa/plugins/alsa/alsa-pcm.c      2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/spa/plugins/alsa/alsa-pcm.c      2026-05-13 
16:58:43.000000000 +0200
@@ -714,19 +714,25 @@
 static ssize_t log_write(void *cookie, const char *buf, size_t size)
 {
        struct state *state = cookie;
-       int len;
 
-       while (size > 0) {
-               len = strcspn(buf, "\n");
+       if (!spa_log_level_topic_enabled(state->log, SPA_LOG_TOPIC_DEFAULT, 
SPA_LOG_LEVEL_DEBUG))
+               return size;
+
+       for (size_t left = size; left > 0; ) {
+               const char *end = memchr(buf, '\n', left);
+               size_t len = end ? (size_t)(end - buf) : left;
+
                if (len > 0)
                        spa_log_debug(state->log, "%.*s", (int)len, buf);
-               buf += len + 1;
-               size -= len + 1;
+
+               buf += len + !!end;
+               left -= len + !!end;
        }
+
        return size;
 }
 
-static cookie_io_functions_t io_funcs = {
+static const cookie_io_functions_t io_funcs = {
        .write = log_write,
 };
 
@@ -1092,12 +1098,8 @@
        state->card = NULL;
        state->card_index = SPA_ID_INVALID;
 
-       if ((err = snd_output_close(state->output)) < 0)
-               spa_log_warn(state->log, "output close failed: %s", 
snd_strerror(err));
-       fclose(state->log_file);
-
-       free(state->tag[0]);
-       free(state->tag[1]);
+       spa_clear_ptr(state->tag[0], free);
+       spa_clear_ptr(state->tag[1], free);
 
        if (state->ctl) {
                for (int i = 0; i < state->ctl_n_fds; i++) {
@@ -1119,6 +1121,10 @@
                }
        }
 
+       if ((err = snd_output_close(state->output)) < 0)
+               spa_log_warn(state->log, "output close failed: %s", 
snd_strerror(err));
+       spa_clear_ptr(state->log_file, fclose);
+
        spa_clear_ptr(state->alsa_chmap, free);
 
        return err;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/spa/plugins/alsa/compress-offload-api.c 
new/pipewire-1.6.5/spa/plugins/alsa/compress-offload-api.c
--- old/pipewire-1.6.4/spa/plugins/alsa/compress-offload-api.c  2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/spa/plugins/alsa/compress-offload-api.c  2026-05-13 
16:58:43.000000000 +0200
@@ -40,7 +40,7 @@
 
        snprintf(fn, sizeof(fn), "/dev/snd/comprC%uD%u", card_nr, device_nr);
 
-       context->fd = open(fn, O_WRONLY);
+       context->fd = open(fn, O_WRONLY | O_CLOEXEC);
        if (context->fd < 0) {
                spa_log_error(context->log, "could not open device \"%s\": %s 
(%d)", fn, strerror(errno), errno);
                goto error;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/spa/plugins/alsa/mixer/paths/analog-output-headphones.conf 
new/pipewire-1.6.5/spa/plugins/alsa/mixer/paths/analog-output-headphones.conf
--- 
old/pipewire-1.6.4/spa/plugins/alsa/mixer/paths/analog-output-headphones.conf   
    2026-04-22 10:30:36.000000000 +0200
+++ 
new/pipewire-1.6.5/spa/plugins/alsa/mixer/paths/analog-output-headphones.conf   
    2026-05-13 16:58:43.000000000 +0200
@@ -93,12 +93,6 @@
 override-map.1 = all
 override-map.2 = all-left,all-right
 
-; Keep Line Out disabled in the headphones path so selecting headphones
-; does not also drive speaker/line outputs on shared controls.
-[Element Line Out]
-switch = off
-volume = off
-
 ; This path is intended to control the first headphones, not
 ; the second headphones. But it should not hurt if we leave the second
 ; headphone jack enabled nonetheless.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/spa/plugins/alsa/mixer/paths/analog-output-lineout.conf 
new/pipewire-1.6.5/spa/plugins/alsa/mixer/paths/analog-output-lineout.conf
--- old/pipewire-1.6.4/spa/plugins/alsa/mixer/paths/analog-output-lineout.conf  
2026-04-22 10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/spa/plugins/alsa/mixer/paths/analog-output-lineout.conf  
2026-05-13 16:58:43.000000000 +0200
@@ -113,23 +113,10 @@
 override-map.2 = all-left,all-right
 required-any = any
 
-[Element Line Out]
-switch = mute
-volume = merge
-override-map.1 = all
-override-map.2 = all-left,all-right
-
 [Element Master Mono]
 switch = off
 volume = off
 
-; Prefer manual routing decisions by disabling codec auto-mute here.
-[Element Auto-Mute Mode]
-enumeration = select
-
-[Option Auto-Mute Mode:Disabled]
-name = analog-output-lineout
-
 [Element Line HP Swap]
 switch = off
 required-any = any
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/spa/plugins/audioconvert/audioadapter.c 
new/pipewire-1.6.5/spa/plugins/audioconvert/audioadapter.c
--- old/pipewire-1.6.4/spa/plugins/audioconvert/audioadapter.c  2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/spa/plugins/audioconvert/audioadapter.c  2026-05-13 
16:58:43.000000000 +0200
@@ -507,6 +507,7 @@
 
        if (this->async)
                buffers = SPA_MAX(2u, buffers);
+       blocks = SPA_MIN(blocks, 256u);
 
        spa_log_info(this->log, "%p: buffers:%d, blocks:%d, size:%d, stride:%d 
align:%d %d:%d",
                        this, buffers, blocks, size, stride, align, 
follower_alloc, conv_alloc);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/spa/plugins/audioconvert/audioconvert.c 
new/pipewire-1.6.5/spa/plugins/audioconvert/audioconvert.c
--- old/pipewire-1.6.4/spa/plugins/audioconvert/audioconvert.c  2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/spa/plugins/audioconvert/audioconvert.c  2026-05-13 
16:58:43.000000000 +0200
@@ -1019,8 +1019,7 @@
                this->io_position = data;
 
                if (this->io_position && this->io_clock &&
-                   this->io_position->clock.target_rate.denom != 
this->io_clock->target_rate.denom &&
-                   !this->props.resample_disabled) {
+                   this->io_position->clock.target_rate.denom != 
this->io_clock->target_rate.denom) {
                        spa_log_debug(this->log, "driver %d changed rate:%u -> 
%u", this->io_position->clock.id,
                                        this->io_clock->target_rate.denom,
                                        
this->io_position->clock.target_rate.denom);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/spa/plugins/audiomixer/mixer-dsp.c 
new/pipewire-1.6.5/spa/plugins/audiomixer/mixer-dsp.c
--- old/pipewire-1.6.4/spa/plugins/audiomixer/mixer-dsp.c       2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/spa/plugins/audiomixer/mixer-dsp.c       2026-05-13 
16:58:43.000000000 +0200
@@ -17,6 +17,7 @@
 #include <spa/node/node.h>
 #include <spa/node/utils.h>
 #include <spa/node/io.h>
+#include <spa/utils/ratelimit.h>
 #include <spa/param/audio/format-utils.h>
 #include <spa/param/param.h>
 #include <spa/pod/filter.h>
@@ -125,6 +126,8 @@
        unsigned int started:1;
 
        struct spa_list mix_list;
+
+       struct spa_ratelimit rate_limit;
 };
 
 #define CHECK_ANY_IN(this,d,p)       ((d) == SPA_DIRECTION_INPUT && (p) == 
SPA_ID_INVALID)
@@ -846,9 +849,12 @@
 
        outb = dequeue_buffer(this, outport);
        if (SPA_UNLIKELY(outb == NULL)) {
-               if (outport->n_buffers > 0)
-                       spa_log_warn(this->log, "%p: out of buffers (%d)", this,
-                                       outport->n_buffers);
+               int suppressed;
+               if (outport->n_buffers > 0 &&
+                   (suppressed = spa_ratelimit_test(&this->rate_limit,
+                               this->position->clock.nsec)) >= 0)
+                       spa_log_warn(this->log, "%p: (%d suppressed) out of 
buffers (%d)", this,
+                                       suppressed, outport->n_buffers);
                return -EPIPE;
        }
 
@@ -984,6 +990,9 @@
        spa_list_init(&this->free_list);
        spa_list_init(&this->mix_list);
 
+       this->rate_limit.interval = 2 * SPA_NSEC_PER_SEC;
+       this->rate_limit.burst = 1;
+
        this->node.iface = SPA_INTERFACE_INIT(
                        SPA_TYPE_INTERFACE_Node,
                        SPA_VERSION_NODE,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/spa/plugins/avb/avb-pcm.c 
new/pipewire-1.6.5/spa/plugins/avb/avb-pcm.c
--- old/pipewire-1.6.4/spa/plugins/avb/avb-pcm.c        2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/spa/plugins/avb/avb-pcm.c        2026-05-13 
16:58:43.000000000 +0200
@@ -544,7 +544,7 @@
        struct ifreq req;
        struct props *p = &state->props;
 
-       fd = socket(AF_PACKET, SOCK_DGRAM|SOCK_NONBLOCK, htons(ETH_P_TSN));
+       fd = socket(AF_PACKET, SOCK_DGRAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 
htons(ETH_P_TSN));
        if (fd < 0) {
                spa_log_error(state->log, "socket() failed: %m");
                return -errno;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/spa/plugins/bluez5/backend-native.c 
new/pipewire-1.6.5/spa/plugins/bluez5/backend-native.c
--- old/pipewire-1.6.4/spa/plugins/bluez5/backend-native.c      2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/spa/plugins/bluez5/backend-native.c      2026-05-13 
16:58:43.000000000 +0200
@@ -2613,7 +2613,7 @@
        socklen_t len;
        bdaddr_t src;
 
-       spa_autoclose int sock = socket(PF_BLUETOOTH, SOCK_SEQPACKET | 
SOCK_NONBLOCK, BTPROTO_SCO);
+       spa_autoclose int sock = socket(PF_BLUETOOTH, SOCK_SEQPACKET | 
SOCK_CLOEXEC | SOCK_NONBLOCK, BTPROTO_SCO);
        if (sock < 0) {
                spa_log_error(backend->log, "socket(SEQPACKET, SCO) %s", 
strerror(errno));
                return -1;
@@ -2759,13 +2759,13 @@
        }
 
        /* Clear nonblocking flag we set for connect() */
-       err = fcntl(t->fd, F_GETFL, O_NONBLOCK);
+       err = fcntl(t->fd, F_GETFL);
        if (err < 0) {
                td->err = -errno;
                goto done;
        }
        err &= ~O_NONBLOCK;
-       err = fcntl(t->fd, F_SETFL, O_NONBLOCK, err);
+       err = fcntl(t->fd, F_SETFL, err);
        if (err < 0) {
                td->err = -errno;
                goto done;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/spa/plugins/filter-graph/filter-graph.c 
new/pipewire-1.6.5/spa/plugins/filter-graph/filter-graph.c
--- old/pipewire-1.6.4/spa/plugins/filter-graph/filter-graph.c  2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/spa/plugins/filter-graph/filter-graph.c  2026-05-13 
16:58:43.000000000 +0200
@@ -1806,6 +1806,7 @@
        struct graph_port *gp;
        struct graph_hndl *gh;
        uint32_t i, j, n, n_input, n_output, n_hndl = 0, n_out_hndl;
+       size_t input_count, output_count;
        int res;
        struct descriptor *desc;
        const struct spa_fga_descriptor *d;
@@ -1879,9 +1880,11 @@
        spa_log_info(impl->log, "using %d instances %d %d", n_hndl, n_input, 
n_output);
 
        graph->n_input = 0;
-       graph->input = calloc(n_input * 16 * n_hndl, sizeof(struct graph_port));
+       input_count = n_input * 16 * n_hndl;
+       graph->input = calloc(input_count, sizeof(struct graph_port));
        graph->n_output = 0;
-       graph->output = calloc(n_output * n_hndl, sizeof(struct graph_port));
+       output_count = n_output * n_hndl;
+       graph->output = calloc(output_count, sizeof(struct graph_port));
 
        /* now collect all input and output ports for all the handles. */
        for (i = 0; i < n_hndl; i++) {
@@ -1889,6 +1892,10 @@
                        desc = first->desc;
                        d = desc->desc;
                        for (j = 0; j < desc->n_input; j++) {
+                               if (graph->n_input >= input_count) {
+                                       res = -ENOSPC;
+                                       goto error;
+                               }
                                gp = &graph->input[graph->n_input++];
                                spa_log_info(impl->log, "input port %s[%d]:%s",
                                                first->name, i, 
d->ports[desc->input[j]].name);
@@ -1901,6 +1908,10 @@
                        for (n = 0; n < graph->n_input_names; n++) {
                                pname = graph->input_names[n];
                                if (spa_streq(pname, "null")) {
+                                       if (graph->n_input >= input_count) {
+                                               res = -ENOSPC;
+                                               goto error;
+                                       }
                                        gp = &graph->input[graph->n_input++];
                                        gp->desc = NULL;
                                        spa_log_info(impl->log, "ignore input 
port %d", graph->n_input);
@@ -1936,6 +1947,10 @@
                                                        spa_list_for_each(link, 
&p->link_list, output_link) {
                                                                struct port 
*peer = link->input;
 
+                                                               if 
(graph->n_input >= input_count) {
+                                                                       res = 
-ENOSPC;
+                                                                       goto 
error;
+                                                               }
                                                                
spa_log_info(impl->log, "copy input port %s[%d]:%s",
                                                                        
port->node->name, i,
                                                                        
d->ports[port->p].name);
@@ -1954,6 +1969,10 @@
                                                port->node->disabled = disabled;
                                        }
                                        if (!disabled) {
+                                               if (graph->n_input >= 
input_count) {
+                                                       res = -ENOSPC;
+                                                       goto error;
+                                               }
                                                spa_log_info(impl->log, "input 
port %s[%d]:%s",
                                                        port->node->name, i, 
d->ports[port->p].name);
                                                port->external = graph->n_input;
@@ -1971,6 +1990,10 @@
                        desc = last->desc;
                        d = desc->desc;
                        for (j = 0; j < desc->n_output; j++) {
+                               if (graph->n_output >= output_count) {
+                                       res = -ENOSPC;
+                                       goto error;
+                               }
                                gp = &graph->output[graph->n_output++];
                                spa_log_info(impl->log, "output port %s[%d]:%s",
                                                last->name, i, 
d->ports[desc->output[j]].name);
@@ -1982,6 +2005,10 @@
                } else {
                        for (n = 0; n < graph->n_output_names; n++) {
                                pname = graph->output_names[n];
+                               if (graph->n_output >= output_count) {
+                                       res = -ENOSPC;
+                                       goto error;
+                               }
                                gp = &graph->output[graph->n_output];
                                if (spa_streq(pname, "null")) {
                                        gp->desc = NULL;
@@ -2204,6 +2231,10 @@
                if ((res = load_node(graph, &it[1])) < 0)
                        return res;
        }
+       if (spa_list_is_empty(&graph->node_list)) {
+               spa_log_error(impl->log, "filter.graph has no nodes");
+               return -EINVAL;
+       }
        if (plinks != NULL) {
                while (spa_json_enter_object(plinks, &it[1]) > 0) {
                        if ((res = parse_link(graph, &it[1])) < 0)
@@ -2256,7 +2287,6 @@
        else
                graph->default_outputs = last->desc->n_output;
 
-
        return 0;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/spa/plugins/filter-graph/plugin_builtin.c 
new/pipewire-1.6.5/spa/plugins/filter-graph/plugin_builtin.c
--- old/pipewire-1.6.4/spa/plugins/filter-graph/plugin_builtin.c        
2026-04-22 10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/spa/plugins/filter-graph/plugin_builtin.c        
2026-05-13 16:58:43.000000000 +0200
@@ -2663,221 +2663,6 @@
        .cleanup = builtin_cleanup,
 };
 
-/* pipe */
-struct pipe_impl {
-       struct plugin *plugin;
-
-       struct spa_log *log;
-       struct spa_fga_dsp *dsp;
-       unsigned long rate;
-       float *port[3];
-       float latency;
-
-       int write_fd;
-       int read_fd;
-       size_t written;
-       size_t read;
-};
-
-static int do_exec(struct pipe_impl *impl, const char *command)
-{
-       int pid, res, len, argc = 0;
-       char *argv[512];
-       struct spa_json it[2];
-       const char *value;
-       int stdin_pipe[2];
-       int stdout_pipe[2];
-
-        if (spa_json_begin_array_relax(&it[0], command, strlen(command)) <= 0)
-                return -EINVAL;
-
-        while ((len = spa_json_next(&it[0], &value)) > 0) {
-                char *s;
-
-                if ((s = malloc(len+1)) == NULL)
-                        return -errno;
-
-                spa_json_parse_stringn(value, len, s, len+1);
-
-               argv[argc++] = s;
-        }
-       argv[argc++] = NULL;
-
-       pipe2(stdin_pipe, 0);
-       pipe2(stdout_pipe, 0);
-
-       impl->write_fd = stdin_pipe[1];
-       impl->read_fd = stdout_pipe[0];
-
-       pid = fork();
-
-       if (pid == 0) {
-               char buf[1024];
-               char *const *p;
-               struct spa_strbuf s;
-
-               /* Double fork to avoid zombies; we don't want to set SIGCHLD 
handler */
-               pid = fork();
-
-               if (pid < 0) {
-                       spa_log_error(impl->log, "fork error: %m");
-                       goto done;
-               } else if (pid != 0) {
-                       exit(0);
-               }
-
-               dup2(stdin_pipe[0], 0);
-               dup2(stdout_pipe[1], 1);
-
-               spa_strbuf_init(&s, buf, sizeof(buf));
-               for (p = argv; *p; ++p)
-                       spa_strbuf_append(&s, " '%s'", *p);
-
-               spa_log_info(impl->log, "exec%s", s.buffer);
-               res = execvp(argv[0], argv);
-
-               if (res == -1) {
-                       res = -errno;
-                       spa_log_error(impl->log, "execvp error '%s': %m", 
argv[0]);
-               }
-done:
-               exit(1);
-       } else if (pid < 0) {
-               spa_log_error(impl->log, "fork error: %m");
-       } else {
-               int status = 0;
-               do {
-                       errno = 0;
-                       res = waitpid(pid, &status, 0);
-               } while (res < 0 && errno == EINTR);
-               spa_log_debug(impl->log, "exec got pid %d res:%d status:%d", 
(int)pid, res, status);
-       }
-       return 0;
-}
-
-static void pipe_transfer(struct pipe_impl *impl, float *in, float *out, int 
count)
-{
-       ssize_t sz;
-
-       sz = read(impl->read_fd, out, count * sizeof(float));
-       if (sz > 0) {
-               impl->read += sz;
-               if (impl->read == (size_t)sz) {
-                       while ((sz = read(impl->read_fd, out, count * 
sizeof(float))) != -1)
-                               impl->read += sz;
-               }
-       } else {
-               memset(out, 0, count * sizeof(float));
-       }
-       if ((sz = write(impl->write_fd, in, count * sizeof(float))) != -1)
-               impl->written += sz;
-}
-
-static void *pipe_instantiate(const struct spa_fga_plugin *plugin, const 
struct spa_fga_descriptor * Descriptor,
-               unsigned long SampleRate, int index, const char *config)
-{
-       struct plugin *pl = SPA_CONTAINER_OF(plugin, struct plugin, plugin);
-       struct pipe_impl *impl;
-       struct spa_json it[2];
-       const char *val;
-       char key[256];
-       spa_autofree char*command = NULL;
-       int len;
-
-       errno = EINVAL;
-       if (config == NULL) {
-               spa_log_error(pl->log, "pipe: requires a config section");
-               return NULL;
-       }
-
-       if (spa_json_begin_object(&it[0], config, strlen(config)) <= 0) {
-               spa_log_error(pl->log, "pipe: config must be an object");
-               return NULL;
-       }
-
-       while ((len = spa_json_object_next(&it[0], key, sizeof(key), &val)) > 
0) {
-               if (spa_streq(key, "command")) {
-                       if ((command = malloc(len+1)) == NULL)
-                               return NULL;
-
-                       if (spa_json_parse_stringn(val, len, command, len+1) <= 
0) {
-                               spa_log_error(pl->log, "pipe: command requires 
a string");
-                               return NULL;
-                       }
-               }
-               else {
-                       spa_log_warn(pl->log, "pipe: ignoring config key: 
'%s'", key);
-               }
-       }
-       if (command == NULL || command[0] == '\0') {
-               spa_log_error(pl->log, "pipe: command must be given and can not 
be empty");
-               return NULL;
-       }
-
-       impl = calloc(1, sizeof(*impl));
-       if (impl == NULL)
-               return NULL;
-
-       impl->plugin = pl;
-       impl->log = pl->log;
-       impl->dsp = pl->dsp;
-       impl->rate = SampleRate;
-
-       do_exec(impl, command);
-
-       fcntl(impl->write_fd, F_SETFL, fcntl(impl->write_fd, F_GETFL) | 
O_NONBLOCK);
-       fcntl(impl->read_fd, F_SETFL, fcntl(impl->read_fd, F_GETFL) | 
O_NONBLOCK);
-
-       return impl;
-}
-
-static void pipe_connect_port(void *Instance, unsigned long Port, void * 
DataLocation)
-{
-       struct pipe_impl *impl = Instance;
-       impl->port[Port] = DataLocation;
-}
-
-static void pipe_run(void * Instance, unsigned long SampleCount)
-{
-       struct pipe_impl *impl = Instance;
-       float *in = impl->port[0], *out = impl->port[1];
-
-       if (in != NULL && out != NULL)
-               pipe_transfer(impl, in, out, SampleCount);
-}
-
-static void pipe_cleanup(void * Instance)
-{
-       struct pipe_impl *impl = Instance;
-       close(impl->write_fd);
-       close(impl->read_fd);
-       free(impl);
-}
-
-static struct spa_fga_port pipe_ports[] = {
-       { .index = 0,
-         .name = "In",
-         .flags = SPA_FGA_PORT_INPUT | SPA_FGA_PORT_AUDIO,
-       },
-       { .index = 1,
-         .name = "Out",
-         .flags = SPA_FGA_PORT_OUTPUT | SPA_FGA_PORT_AUDIO,
-       },
-};
-
-static const struct spa_fga_descriptor pipe_desc = {
-       .name = "pipe",
-       .flags = SPA_FGA_DESCRIPTOR_SUPPORTS_NULL_DATA,
-
-       .n_ports = SPA_N_ELEMENTS(pipe_ports),
-       .ports = pipe_ports,
-
-       .instantiate = pipe_instantiate,
-       .connect_port = pipe_connect_port,
-       .run = pipe_run,
-       .cleanup = pipe_cleanup,
-};
-
 /* zeroramp */
 static struct spa_fga_port zeroramp_ports[] = {
        { .index = 0,
@@ -3306,14 +3091,12 @@
        case 27:
                return &debug_desc;
        case 28:
-               return &pipe_desc;
-       case 29:
                return &zeroramp_desc;
-       case 30:
+       case 29:
                return &noisegate_desc;
-       case 31:
+       case 30:
                return &busy_desc;
-       case 32:
+       case 31:
                return &null_desc;
        }
        return NULL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/spa/plugins/support/node-driver.c 
new/pipewire-1.6.5/spa/plugins/support/node-driver.c
--- old/pipewire-1.6.4/spa/plugins/support/node-driver.c        2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/spa/plugins/support/node-driver.c        2026-05-13 
16:58:43.000000000 +0200
@@ -724,7 +724,7 @@
        strncpy(ifr.ifr_name, name, IFNAMSIZ - 1);
        ifr.ifr_data = (char *) &info;
 
-       fd = socket(AF_INET, SOCK_DGRAM, 0);
+       fd = socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0);
        if (fd < 0)
                return -errno;
 
@@ -756,7 +756,7 @@
 
 static bool parse_clock_device(struct impl *this, const char *s)
 {
-       int fd = open(s, O_RDONLY);
+       int fd = open(s, O_RDONLY | O_CLOEXEC);
        if (fd == -1) {
                spa_log_info(this->log, "failed to open clock device '%s': %m", 
s);
                return false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/spa/plugins/v4l2/v4l2-utils.c 
new/pipewire-1.6.5/spa/plugins/v4l2/v4l2-utils.c
--- old/pipewire-1.6.4/spa/plugins/v4l2/v4l2-utils.c    2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/spa/plugins/v4l2/v4l2-utils.c    2026-05-13 
16:58:43.000000000 +0200
@@ -42,7 +42,7 @@
 
        spa_log_info(dev->log, "device is '%s'", path);
 
-       dev->fd = open(path, O_RDWR | O_NONBLOCK, 0);
+       dev->fd = open(path, O_RDWR | O_NONBLOCK | O_CLOEXEC, 0);
        if (dev->fd == -1) {
                err = errno;
                spa_log_error(dev->log, "Cannot open '%s': %d, %s",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/spa/plugins/videoconvert/videoadapter.c 
new/pipewire-1.6.5/spa/plugins/videoconvert/videoadapter.c
--- old/pipewire-1.6.4/spa/plugins/videoconvert/videoadapter.c  2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/spa/plugins/videoconvert/videoadapter.c  2026-05-13 
16:58:43.000000000 +0200
@@ -512,6 +512,7 @@
 
        if (this->async)
                buffers = SPA_MAX(2u, buffers);
+       blocks = SPA_MIN(blocks, 256u);
 
        spa_log_info(this->log, "%p: buffers:%d, blocks:%d, size:%d, stride:%d 
align:%d %d:%d",
                        this, buffers, blocks, size, stride, align, 
follower_alloc, conv_alloc);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/spa/plugins/vulkan/vulkan-compute-utils.c 
new/pipewire-1.6.5/spa/plugins/vulkan/vulkan-compute-utils.c
--- old/pipewire-1.6.4/spa/plugins/vulkan/vulkan-compute-utils.c        
2026-04-22 10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/spa/plugins/vulkan/vulkan-compute-utils.c        
2026-05-13 16:58:43.000000000 +0200
@@ -163,7 +163,7 @@
        int fd;
        struct stat stat;
 
-       if ((fd = open(shaderFile, 0, O_RDONLY)) == -1) {
+       if ((fd = open(shaderFile, 0, O_RDONLY | O_CLOEXEC)) == -1) {
                spa_log_error(s->log, "can't open %s: %m", shaderFile);
                return VK_NULL_HANDLE;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/src/modules/module-avb/avdecc.c 
new/pipewire-1.6.5/src/modules/module-avb/avdecc.c
--- old/pipewire-1.6.4/src/modules/module-avb/avdecc.c  2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/src/modules/module-avb/avdecc.c  2026-05-13 
16:58:43.000000000 +0200
@@ -143,7 +143,7 @@
        struct packet_mreq mreq;
        struct sockaddr_ll sll;
 
-       fd = socket(AF_PACKET, SOCK_RAW|SOCK_NONBLOCK, htons(ETH_P_ALL));
+       fd = socket(AF_PACKET, SOCK_RAW | SOCK_CLOEXEC | SOCK_NONBLOCK, 
htons(ETH_P_ALL));
        if (fd < 0) {
                pw_log_error("socket() failed: %m");
                return -errno;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/src/modules/module-echo-cancel.c 
new/pipewire-1.6.5/src/modules/module-echo-cancel.c
--- old/pipewire-1.6.4/src/modules/module-echo-cancel.c 2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/src/modules/module-echo-cancel.c 2026-05-13 
16:58:43.000000000 +0200
@@ -1616,6 +1616,7 @@
        }
 
        pw_properties_free(props);
+       props = NULL;
 
        pw_proxy_add_listener((struct pw_proxy*)impl->core,
                        &impl->core_proxy_listener,
@@ -1624,7 +1625,8 @@
                        &impl->core_listener,
                        &core_events, impl);
 
-       setup_streams(impl);
+       if ((res = setup_streams(impl)) < 0)
+               goto error;
 
        pw_impl_module_add_listener(module, &impl->module_listener, 
&module_events, impl);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/src/modules/module-example-filter.c 
new/pipewire-1.6.5/src/modules/module-example-filter.c
--- old/pipewire-1.6.4/src/modules/module-example-filter.c      2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/src/modules/module-example-filter.c      2026-05-13 
16:58:43.000000000 +0200
@@ -590,7 +590,7 @@
        } else if (impl->capture_info.rate && !impl->playback_info.rate)
                impl->playback_info.rate = impl->capture_info.rate;
        else if (impl->playback_info.rate && !impl->capture_info.rate)
-               impl->capture_info.rate = !impl->playback_info.rate;
+               impl->capture_info.rate = impl->playback_info.rate;
        else if (impl->capture_info.rate != impl->playback_info.rate) {
                pw_log_warn("Both capture and playback rate are set, but"
                        " they are different. Using the highest of two. This 
behaviour"
@@ -623,6 +623,7 @@
        }
 
        pw_properties_free(props);
+       props = NULL;
 
        pw_proxy_add_listener((struct pw_proxy*)impl->core,
                        &impl->core_proxy_listener,
@@ -631,7 +632,8 @@
                        &impl->core_listener,
                        &core_events, impl);
 
-       setup_streams(impl);
+       if ((res = setup_streams(impl)) < 0)
+               goto error;
 
        pw_impl_module_add_listener(module, &impl->module_listener, 
&module_events, impl);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/src/modules/module-filter-chain.c 
new/pipewire-1.6.5/src/modules/module-filter-chain.c
--- old/pipewire-1.6.4/src/modules/module-filter-chain.c        2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/src/modules/module-filter-chain.c        2026-05-13 
16:58:43.000000000 +0200
@@ -590,38 +590,6 @@
  * control from "Control" will be copied to "Notify" and the control value 
will be
  * dumped into the INFO log.
  *
- * ### Pipe
- *
- * The `pipe` plugin can be used to filter the audio with another application 
using pipes
- * for sending and receiving the raw audio.
- *
- * The application needs to consume raw float32 samples from stdin and produce 
filtered
- * float32 samples on stdout.
- *
- * It has an "In" input port and an "Out" output data ports.
- *
- * The node requires a `config` section with extra configuration:
- *
- *\code{.unparsed}
- * filter.graph = {
- *     nodes = [
- *         {
- *             type   = builtin
- *             name   = ...
- *             label  = pipe
- *             config = {
- *                 command = "ffmpeg -f f32le -ac 1 -ar 48000 -blocksize 1024 
-fflags nobuffer -i \"pipe:\"  \"-filter:a\" \"loudnorm=I=-18:TP=-3:LRA=4\" -f 
f32le -ac 1 -ar 48000 \"pipe:\""
- *             }
- *             ...
- *         }
- *     }
- *     ...
- * }
- *\endcode
- *
- * - `command` the command to execute. It should consume samples from stdin 
and produce
- *             samples on stdout.
- *
  * ### Zeroramp
  *
  * The `zeroramp` plugin can be used to detect unnatural silence parts in the 
audio
@@ -1207,6 +1175,8 @@
 
 #define DEFAULT_RATE   48000
 
+#define MAX_DATAS      1024u
+
 struct impl {
        struct pw_context *context;
 
@@ -1260,8 +1230,8 @@
        struct pw_buffer *in, *out;
        uint32_t i, n_in = 0, n_out = 0, data_size = 0;
        struct spa_data *bd;
-       const void *cin[128];
-       void *cout[128];
+       const void *cin[MAX_DATAS];
+       void *cout[MAX_DATAS];
 
        in = out = NULL;
        if (impl->capture) {
@@ -1276,7 +1246,8 @@
                if (in == NULL) {
                        pw_log_debug("%p: out of capture buffers: %m", impl);
                } else {
-                       for (i = 0; i < in->buffer->n_datas; i++) {
+                       uint32_t n_datas = SPA_MIN(MAX_DATAS, 
in->buffer->n_datas);
+                       for (i = 0; i < n_datas; i++) {
                                uint32_t offs, size;
 
                                bd = &in->buffer->datas[i];
@@ -1295,10 +1266,12 @@
                if (out == NULL) {
                        pw_log_debug("%p: out of playback buffers: %m", impl);
                } else {
+                       uint32_t n_datas = SPA_MIN(MAX_DATAS, 
out->buffer->n_datas);
+
                        if (data_size == 0)
                                data_size = out->requested * sizeof(float);
 
-                       for (i = 0; i < out->buffer->n_datas; i++) {
+                       for (i = 0; i < n_datas; i++) {
                                bd = &out->buffer->datas[i];
 
                                data_size = SPA_MIN(data_size, bd->maxsize);
@@ -1314,13 +1287,14 @@
                                data_size, out->requested);
        }
 
-       for (; n_in < impl->n_inputs; i++)
-               cin[n_in++] = NULL;
-       for (; n_out < impl->n_outputs; i++)
-               cout[n_out++] = NULL;
+       if (impl->graph_active) {
+               for (; n_in < impl->n_inputs; i++)
+                       cin[n_in++] = NULL;
+               for (; n_out < impl->n_outputs; i++)
+                       cout[n_out++] = NULL;
 
-       if (impl->graph_active)
                spa_filter_graph_process(impl->graph, cin, cout, data_size / 
sizeof(float));
+       }
 
        if (in != NULL)
                pw_stream_queue_buffer(impl->capture, in);
@@ -1651,7 +1625,7 @@
 
 static int setup_streams(struct impl *impl)
 {
-       int res;
+       int res = 0;
        uint32_t i, n_params, *offs, flags;
        struct pw_array offsets;
        const struct spa_pod **params = NULL;
@@ -1789,10 +1763,23 @@
 {
        struct impl *impl = object;
        struct spa_dict *props = info->props;
-       uint32_t i, val = 0;
+       uint32_t i, val = 0, n_inputs, n_outputs;
 
-       impl->n_inputs = info->n_inputs;
-       impl->n_outputs = info->n_outputs;
+       n_inputs = info->n_inputs;
+       n_outputs = info->n_outputs;
+
+       if (n_inputs > MAX_DATAS) {
+               pw_log_warn("filter has too many inputs %d > %d",
+                               n_inputs, MAX_DATAS);
+               n_inputs = MAX_DATAS;
+       }
+       if (n_outputs > MAX_DATAS) {
+               pw_log_warn("filter has too many outputs %d > %d",
+                               n_outputs, MAX_DATAS);
+               n_outputs = MAX_DATAS;
+       }
+       impl->n_inputs = n_inputs;
+       impl->n_outputs = n_outputs;
 
        for (i = 0; props && i < props->n_items; i++) {
                const char *k = props->items[i].key;
@@ -2116,7 +2103,8 @@
                        &impl->core_listener,
                        &core_events, impl);
 
-       setup_streams(impl);
+       if ((res = setup_streams(impl)) < 0)
+               goto error;
 
        pw_impl_module_add_listener(module, &impl->module_listener, 
&module_events, impl);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/src/modules/module-jack-tunnel.c 
new/pipewire-1.6.5/src/modules/module-jack-tunnel.c
--- old/pipewire-1.6.4/src/modules/module-jack-tunnel.c 2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/src/modules/module-jack-tunnel.c 2026-05-13 
16:58:43.000000000 +0200
@@ -406,7 +406,7 @@
                src = jack.port_get_buffer (p->jack_port, n_samples);
 
                if (SPA_UNLIKELY(p->is_midi))
-                       jack_to_midi(dst, src, n_samples);
+                       jack_to_midi(dst, src, n_samples * sizeof(float));
                else
                        do_volume(dst, src, &s->volume, i, n_samples);
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/src/modules/module-loopback.c 
new/pipewire-1.6.5/src/modules/module-loopback.c
--- old/pipewire-1.6.4/src/modules/module-loopback.c    2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/src/modules/module-loopback.c    2026-05-13 
16:58:43.000000000 +0200
@@ -970,7 +970,7 @@
        } else if (impl->capture_info.rate && !impl->playback_info.rate)
                impl->playback_info.rate = impl->capture_info.rate;
        else if (impl->playback_info.rate && !impl->capture_info.rate)
-               impl->capture_info.rate = !impl->playback_info.rate;
+               impl->capture_info.rate = impl->playback_info.rate;
        else if (impl->capture_info.rate != impl->playback_info.rate) {
                pw_log_warn("Both capture and playback rate are set, but"
                        " they are different. Using the highest of two. This 
behaviour"
@@ -1003,6 +1003,7 @@
        }
 
        pw_properties_free(props);
+       props = NULL;
 
        pw_proxy_add_listener((struct pw_proxy*)impl->core,
                        &impl->core_proxy_listener,
@@ -1011,7 +1012,8 @@
                        &impl->core_listener,
                        &core_events, impl);
 
-       setup_streams(impl);
+       if ((res = setup_streams(impl)) < 0)
+               goto error;
 
        pw_impl_module_add_listener(module, &impl->module_listener, 
&module_events, impl);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/src/modules/module-protocol-native/connection.c 
new/pipewire-1.6.5/src/modules/module-protocol-native/connection.c
--- old/pipewire-1.6.4/src/modules/module-protocol-native/connection.c  
2026-04-22 10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/src/modules/module-protocol-native/connection.c  
2026-05-13 16:58:43.000000000 +0200
@@ -144,6 +144,8 @@
                if (np == NULL) {
                        res = -errno;
                        free(buf->buffer_data);
+                       buf->buffer_data = NULL;
+                       buf->buffer_size = 0;
                        buf->buffer_maxsize = 0;
                        spa_hook_list_call(&conn->listener_list,
                                        struct 
pw_protocol_native_connection_events,
@@ -702,11 +704,14 @@
        struct buffer *buf = &impl->out;
        int res;
 
+       if (size > 0xffffff)
+               return -ENOSPC;
+
        if ((p = connection_ensure_size(conn, buf, impl->hdr_size + size)) == 
NULL)
                return -errno;
 
        p[0] = buf->msg.id;
-       p[1] = (buf->msg.opcode << 24) | (size & 0xffffff);
+       p[1] = (buf->msg.opcode << 24) | size;
        if (impl->version >= 3) {
                p[2] = buf->msg.seq;
                p[3] = buf->msg.n_fds;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/src/modules/module-protocol-native/test-connection.c 
new/pipewire-1.6.5/src/modules/module-protocol-native/test-connection.c
--- old/pipewire-1.6.4/src/modules/module-protocol-native/test-connection.c     
2026-04-22 10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/src/modules/module-protocol-native/test-connection.c     
2026-05-13 16:58:43.000000000 +0200
@@ -181,7 +181,7 @@
        spa_assert_se(loop != NULL);
        context = pw_context_new(pw_main_loop_get_loop(loop), NULL, 0);
 
-       if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) < 0) {
+       if (socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0, fds) < 0) {
                spa_assert_not_reached();
                return -1;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/src/modules/module-protocol-pulse/format.c 
new/pipewire-1.6.5/src/modules/module-protocol-pulse/format.c
--- old/pipewire-1.6.4/src/modules/module-protocol-pulse/format.c       
2026-04-22 10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/src/modules/module-protocol-pulse/format.c       
2026-05-13 16:58:43.000000000 +0200
@@ -750,16 +750,17 @@
        if (val->type != SPA_TYPE_Id)
                return -ENOTSUP;
 
-       if (index >= n_values)
-               return -ENOENT;
-
        values = SPA_POD_BODY(val);
 
        switch (choice) {
        case SPA_CHOICE_None:
+               if (index >= n_values)
+                       return -ENOENT;
                info->encoding = format_encoding_from_id(values[index]);
                break;
        case SPA_CHOICE_Enum:
+               if (index + 1 >= n_values)
+                       return -ENOENT;
                info->encoding = format_encoding_from_id(values[index+1]);
                break;
        default:
@@ -879,6 +880,8 @@
                        return -EINVAL;
                while ((*str == '\"' || *str == ',') &&
                    (len = strcspn(++str, "\",")) > 0) {
+                       if (map->channels >= CHANNELS_MAX)
+                               return -EINVAL;
                        map->map[map->channels++] = channel_paname2id(str, len);
                        str += len;
                }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/src/modules/module-protocol-pulse/message.c 
new/pipewire-1.6.5/src/modules/module-protocol-pulse/message.c
--- old/pipewire-1.6.4/src/modules/module-protocol-pulse/message.c      
2026-04-22 10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/src/modules/module-protocol-pulse/message.c      
2026-05-13 16:58:43.000000000 +0200
@@ -145,7 +145,7 @@
        int res;
        if ((res = read_u32(m, &len)) < 0)
                return res;
-       if (m->offset + len > m->length)
+       if (m->offset > m->length || len > m->length - m->offset)
                return -ENOSPC;
        *val = m->data + m->offset;
        m->offset += len;
@@ -215,7 +215,7 @@
 
        if ((res = read_u8(m, &vol->channels)) < 0)
                return res;
-       if (vol->channels > CHANNELS_MAX)
+       if (vol->channels == 0 || vol->channels > CHANNELS_MAX)
                return -EINVAL;
        for (i = 0; i < vol->channels; i ++) {
                if ((res = read_volume(m, &vol->values[i])) < 0)
@@ -361,6 +361,8 @@
                        if ((res = read_format_info(m, va_arg(va, struct 
format_info*))) < 0)
                                goto done;
                        break;
+               default:
+                       goto invalid;
                }
        }
        res = 0;
@@ -383,9 +385,12 @@
        if (m->length > m->allocated)
                return -ENOMEM;
 
-       if (m->length + size <= m->allocated)
+       if (size <= m->allocated - m->length)
                return size;
 
+       if (m->allocated + size < m->allocated)
+               return -ENOMEM;
+
        alloc = SPA_ROUND_UP_N(SPA_MAX(m->allocated + size, 4096u), 4096u);
        diff = alloc - m->allocated;
        if ((data = realloc(m->data, alloc)) == NULL) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/src/modules/module-protocol-pulse/module.c 
new/pipewire-1.6.5/src/modules/module-protocol-pulse/module.c
--- old/pipewire-1.6.4/src/modules/module-protocol-pulse/module.c       
2026-04-22 10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/src/modules/module-protocol-pulse/module.c       
2026-05-13 16:58:43.000000000 +0200
@@ -147,8 +147,11 @@
                for (e = p; *p ;) {
                        if (*p == f)
                                break;
-                       if (*p == '\\')
+                       if (*p == '\\') {
                                p++;
+                               if (*p == '\0')
+                                       break;
+                       }
                        *e++ = *p++;
                }
                if (*p != '\0')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/src/modules/module-protocol-pulse/modules/module-combine-sink.c
 
new/pipewire-1.6.5/src/modules/module-protocol-pulse/modules/module-combine-sink.c
--- 
old/pipewire-1.6.4/src/modules/module-protocol-pulse/modules/module-combine-sink.c
  2026-04-22 10:30:36.000000000 +0200
+++ 
new/pipewire-1.6.5/src/modules/module-protocol-pulse/modules/module-combine-sink.c
  2026-05-13 16:58:43.000000000 +0200
@@ -185,7 +185,9 @@
        } else {
                for (i = 0; data->sink_names[i] != NULL; i++) {
                        char name[1024];
-                       spa_json_encode_string(name, sizeof(name)-1, 
data->sink_names[i]);
+                       if (spa_json_encode_string(name, sizeof(name), 
data->sink_names[i]) >= (int)sizeof(name))
+                               continue;
+
                        fprintf(f, "  { matches = [ { media.class = 
\"Audio/Sink\" ");
                        fprintf(f, " node.name = %s } ]", name);
                        fprintf(f, "    actions = { create-stream = { } } }");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/src/modules/module-protocol-pulse/modules/module-echo-cancel.c
 
new/pipewire-1.6.5/src/modules/module-protocol-pulse/modules/module-echo-cancel.c
--- 
old/pipewire-1.6.4/src/modules/module-protocol-pulse/modules/module-echo-cancel.c
   2026-04-22 10:30:36.000000000 +0200
+++ 
new/pipewire-1.6.5/src/modules/module-protocol-pulse/modules/module-echo-cancel.c
   2026-05-13 16:58:43.000000000 +0200
@@ -269,6 +269,10 @@
 
        if ((str = pw_properties_get(props, "aec_method")) == NULL)
                str = "webrtc";
+       if (strstr(str, "..") != NULL || strchr(str, '/') != NULL) {
+               res = -EINVAL;
+               goto out;
+       }
        pw_properties_setf(global_props, "library.name", "aec/libspa-aec-%s", 
str);
 
        if ((str = pw_properties_get(props, "source_name")) != NULL) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/src/modules/module-protocol-pulse/modules/module-switch-on-connect.c
 
new/pipewire-1.6.5/src/modules/module-protocol-pulse/modules/module-switch-on-connect.c
--- 
old/pipewire-1.6.4/src/modules/module-protocol-pulse/modules/module-switch-on-connect.c
     2026-04-22 10:30:36.000000000 +0200
+++ 
new/pipewire-1.6.5/src/modules/module-protocol-pulse/modules/module-switch-on-connect.c
     2026-05-13 16:58:43.000000000 +0200
@@ -257,6 +257,9 @@
        if ((str = pw_properties_get(props, "blocklist")) == NULL)
                str = DEFAULT_BLOCKLIST;
 
+       if (strlen(str) > 1024)
+               return -EINVAL;
+
        if (regcomp(&d->blocklist, str, REG_NOSUB | REG_EXTENDED) != 0)
                return -EINVAL;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/src/modules/module-protocol-pulse/pulse-server.c 
new/pipewire-1.6.5/src/modules/module-protocol-pulse/pulse-server.c
--- old/pipewire-1.6.4/src/modules/module-protocol-pulse/pulse-server.c 
2026-04-22 10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/src/modules/module-protocol-pulse/pulse-server.c 
2026-05-13 16:58:43.000000000 +0200
@@ -1115,8 +1115,8 @@
        switch (id) {
        case SPA_PROP_channelVolumes:
                if (!stream->volume_set) {
-                       stream->volume.channels = control->n_values;
-                       memcpy(stream->volume.values, control->values, 
control->n_values * sizeof(float));
+                       stream->volume.channels = SPA_MIN(control->n_values, 
CHANNELS_MAX);
+                       memcpy(stream->volume.values, control->values, 
stream->volume.channels * sizeof(float));
                        pw_log_info("stream %p: volume changed %f", stream, 
stream->volume.values[0]);
                }
                break;
@@ -2690,6 +2690,8 @@
        stream = pw_map_lookup(&client->streams, channel);
        if (stream == NULL || stream->type == STREAM_TYPE_UPLOAD)
                return -ENOENT;
+       if (stream->create_tag != SPA_ID_INVALID)
+               return -ENOENT;
 
        stream_set_corked(stream, cork);
        if (cork) {
@@ -2720,6 +2722,8 @@
        stream = pw_map_lookup(&client->streams, channel);
        if (stream == NULL || stream->type == STREAM_TYPE_UPLOAD)
                return -ENOENT;
+       if (stream->create_tag != SPA_ID_INVALID)
+               return -ENOENT;
 
        switch (command) {
        case COMMAND_FLUSH_PLAYBACK_STREAM:
@@ -3219,6 +3223,8 @@
        stream = pw_map_lookup(&client->streams, channel);
        if (stream == NULL || stream->type == STREAM_TYPE_UPLOAD)
                return -ENOENT;
+       if (stream->create_tag != SPA_ID_INVALID)
+               return -ENOENT;
 
        items[0] = SPA_DICT_ITEM_INIT(PW_KEY_MEDIA_NAME, name);
        pw_stream_update_properties(stream->stream,
@@ -4518,7 +4524,7 @@
                        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) {
@@ -4608,6 +4614,11 @@
        stream = pw_map_lookup(&client->streams, channel);
        if (stream == NULL || stream->type == STREAM_TYPE_UPLOAD)
                return -ENOENT;
+       if (stream->create_tag != SPA_ID_INVALID)
+               return -ENOENT;
+
+       if (rate == 0 || rate > RATE_MAX)
+               return -EINVAL;
 
        stream->rate = rate;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/src/modules/module-protocol-pulse/sample-play.c 
new/pipewire-1.6.5/src/modules/module-protocol-pulse/sample-play.c
--- old/pipewire-1.6.4/src/modules/module-protocol-pulse/sample-play.c  
2026-04-22 10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/src/modules/module-protocol-pulse/sample-play.c  
2026-05-13 16:58:43.000000000 +0200
@@ -100,7 +100,8 @@
        if (b->requested)
                size = SPA_MIN(size, b->requested * p->stride);
 
-       memcpy(d, s->buffer + p->offset, size);
+       spa_ringbuffer_read_data(NULL, s->buffer, MAXLENGTH,
+                       p->offset % MAXLENGTH, d, size);
 
        p->offset += size;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pipewire-1.6.4/src/modules/module-protocol-pulse/server.c 
new/pipewire-1.6.5/src/modules/module-protocol-pulse/server.c
--- old/pipewire-1.6.4/src/modules/module-protocol-pulse/server.c       
2026-04-22 10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/src/modules/module-protocol-pulse/server.c       
2026-05-13 16:58:43.000000000 +0200
@@ -128,7 +128,8 @@
                     client, channel, offset, flags, msg->length);
 
        stream = pw_map_lookup(&client->streams, channel);
-       if (stream == NULL || stream->type == STREAM_TYPE_RECORD) {
+       if (stream == NULL || stream->type == STREAM_TYPE_RECORD ||
+           (stream->type != STREAM_TYPE_UPLOAD && stream->create_tag != 
SPA_ID_INVALID)) {
                pw_log_info("client %p [%s]: received memblock for unknown 
channel %d",
                            client, client->name, channel);
                goto finish;
@@ -391,7 +392,6 @@
        }
 
        if (server->n_clients >= server->max_clients) {
-               close(client_fd);
                error_reason = "too many client application connections";
                errno = ECONNREFUSED;
                goto error;
@@ -404,7 +404,7 @@
        pw_log_debug("server %p: new client %p fd:%d", server, client, 
client_fd);
 
        client->source = pw_loop_add_io(impl->main_loop,
-                                       client_fd,
+                                       spa_steal_fd(client_fd),
                                        SPA_IO_ERR | SPA_IO_HUP | SPA_IO_IN,
                                        true, on_client_data, client);
        if (client->source == NULL)
@@ -521,6 +521,8 @@
 
        if (client)
                client_free(client);
+       if (client_fd >= 0)
+               close(client_fd);
 }
 
 static int parse_unix_address(const char *address, struct sockaddr_storage 
*addrs, int len)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/src/modules/module-roc-source.c 
new/pipewire-1.6.5/src/modules/module-roc-source.c
--- old/pipewire-1.6.4/src/modules/module-roc-source.c  2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/src/modules/module-roc-source.c  2026-05-13 
16:58:43.000000000 +0200
@@ -142,6 +142,8 @@
        int local_control_port;
 
        roc_log_level loglevel;
+
+       bool receiving;
 };
 
 static void stream_destroy(void *d)
@@ -205,6 +207,53 @@
        .error = on_core_error,
 };
 
+
+static int start_receiving(struct module_roc_source_data *data)
+{
+       if (data->receiver == NULL || data->receiving)
+               return 0;
+
+       if (data->local_source_addr != NULL) {
+               if (roc_receiver_bind(data->receiver, ROC_SLOT_DEFAULT, 
ROC_INTERFACE_AUDIO_SOURCE,
+                                       data->local_source_addr) != 0) {
+                       pw_log_error("can't connect roc receiver to local 
source address");
+                       goto error;
+               }
+       }
+       if (data->local_repair_addr != NULL) {
+               if (roc_receiver_bind(data->receiver, ROC_SLOT_DEFAULT, 
ROC_INTERFACE_AUDIO_REPAIR,
+                                       data->local_repair_addr) != 0) {
+                       pw_log_error("can't connect roc receiver to local 
repair address");
+                       goto error;
+               }
+       }
+       if (data->local_control_addr != NULL) {
+               if (roc_receiver_bind(data->receiver, ROC_SLOT_DEFAULT, 
ROC_INTERFACE_AUDIO_CONTROL,
+                                       data->local_control_addr) != 0) {
+                       pw_log_error("can't connect roc receiver to local 
control address");
+                       goto error;
+               }
+       }
+       data->receiving = true;
+       return 0;
+error:
+       roc_receiver_unlink(data->receiver, ROC_SLOT_DEFAULT);
+       return -EINVAL;
+}
+
+static int stop_receiving(struct module_roc_source_data *data)
+{
+       if (data->receiver == NULL || !data->receiving)
+               return 0;
+
+       if (roc_receiver_unlink(data->receiver, ROC_SLOT_DEFAULT) != 0)
+               pw_log_warn("can't unlink roc receiver");
+
+       data->receiving = false;
+
+       return 0;
+}
+
 static void on_stream_state_changed(void *d, enum pw_stream_state old,
                enum pw_stream_state state, const char *error)
 {
@@ -218,6 +267,13 @@
        case PW_STREAM_STATE_ERROR:
                pw_log_error("stream error: %s", error);
                break;
+       case PW_STREAM_STATE_STREAMING:
+               if (start_receiving(data) < 0)
+                       pw_impl_module_schedule_destroy(data->module);
+               break;
+       case PW_STREAM_STATE_PAUSED:
+               stop_receiving(data);
+               break;
        default:
                break;
        }
@@ -356,11 +412,6 @@
                return res;
        }
 
-       if (roc_receiver_bind(data->receiver, ROC_SLOT_DEFAULT, 
ROC_INTERFACE_AUDIO_SOURCE,
-                               data->local_source_addr) != 0) {
-               pw_log_error("can't connect roc receiver to local source 
address");
-               return -EINVAL;
-       }
 
        if (repair_proto != 0) {
                res = pw_roc_create_endpoint(&data->local_repair_addr, 
repair_proto, data->local_ip, data->local_repair_port);
@@ -369,11 +420,6 @@
                        return res;
                }
 
-               if (roc_receiver_bind(data->receiver, ROC_SLOT_DEFAULT, 
ROC_INTERFACE_AUDIO_REPAIR,
-                                       data->local_repair_addr) != 0) {
-                       pw_log_error("can't connect roc receiver to local 
repair address");
-                       return -EINVAL;
-               }
        }
 
        res = pw_roc_create_endpoint(&data->local_control_addr, 
PW_ROC_DEFAULT_CONTROL_PROTO, data->local_ip, data->local_control_port);
@@ -382,12 +428,6 @@
                return res;
        }
 
-       if (roc_receiver_bind(data->receiver, ROC_SLOT_DEFAULT, 
ROC_INTERFACE_AUDIO_CONTROL,
-                               data->local_control_addr) != 0) {
-               pw_log_error("can't connect roc receiver to local control 
address");
-               return -EINVAL;
-       }
-
        data->playback = pw_stream_new(data->core,
                        "roc-source playback", data->playback_props);
        data->playback_props = NULL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/src/modules/module-rtp-sap.c 
new/pipewire-1.6.5/src/modules/module-rtp-sap.c
--- old/pipewire-1.6.4/src/modules/module-rtp-sap.c     2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/src/modules/module-rtp-sap.c     2026-05-13 
16:58:43.000000000 +0200
@@ -880,7 +880,7 @@
 
                if ((str = pw_properties_get(sess->props, "source.ip")) == 
NULL) {
                        if (impl->ifname) {
-                               int fd = socket(impl->sap_addr.ss_family, 
SOCK_DGRAM, 0);
+                               int fd = socket(impl->sap_addr.ss_family, 
SOCK_DGRAM | SOCK_CLOEXEC, 0);
                                if (fd >= 0) {
                                        struct ifreq req;
                                        spa_zero(req);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/src/modules/module-spa-node-factory.c 
new/pipewire-1.6.5/src/modules/module-spa-node-factory.c
--- old/pipewire-1.6.4/src/modules/module-spa-node-factory.c    2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/src/modules/module-spa-node-factory.c    2026-05-13 
16:58:43.000000000 +0200
@@ -115,7 +115,7 @@
        .removed = core_removed,
 };
 
-static int export_node(struct node_data *nd, struct pw_properties *props)
+static int export_node(struct node_data *nd, const struct pw_properties *props)
 {
        const char *str;
 
@@ -200,7 +200,7 @@
        int res;
        struct pw_impl_client *client;
        bool linger;
-       spa_autoptr(pw_properties) copy = NULL;
+       const struct pw_properties *p;
 
        if (properties == NULL)
                goto error_properties;
@@ -220,8 +220,6 @@
                        pw_global_get_id(pw_impl_client_get_global(client)));
        }
 
-       copy = pw_properties_copy(properties);
-
        node = pw_spa_node_load(context,
                                factory_name,
                                PW_SPA_NODE_FLAG_ACTIVATE,
@@ -249,8 +247,9 @@
 
                pw_resource_add_listener(nd->resource, &nd->resource_listener, 
&resource_events, nd);
        }
-       if (pw_properties_get_bool(copy, PW_KEY_OBJECT_EXPORT, false)) {
-               res = export_node(nd, copy);
+       p = pw_impl_node_get_properties(node);
+       if (pw_properties_get_bool(p, PW_KEY_OBJECT_EXPORT, false)) {
+               res = export_node(nd, p);
                if (res < 0)
                        goto error_export;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/src/pipewire/conf.c 
new/pipewire-1.6.5/src/pipewire/conf.c
--- old/pipewire-1.6.4/src/pipewire/conf.c      2026-04-22 10:30:36.000000000 
+0200
+++ new/pipewire-1.6.5/src/pipewire/conf.c      2026-05-13 16:58:43.000000000 
+0200
@@ -367,6 +367,11 @@
        }
 
        f = fdopen(fd, "w");
+       if (f == NULL) {
+               res = -errno;
+               close(fd);
+               return res;
+       }
        fprintf(f, "{");
        count += pw_properties_serialize_dict(f, &conf->dict, 
PW_PROPERTIES_FLAG_NL);
        fprintf(f, "%s}", count == 0 ? " " : "\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/src/pipewire/filter.c 
new/pipewire-1.6.5/src/pipewire/filter.c
--- old/pipewire-1.6.4/src/pipewire/filter.c    2026-04-22 10:30:36.000000000 
+0200
+++ new/pipewire-1.6.5/src/pipewire/filter.c    2026-05-13 16:58:43.000000000 
+0200
@@ -969,6 +969,8 @@
 
        if ((port = get_port(impl, SPA_DIRECTION_OUTPUT, port_id)) == NULL)
                return -EINVAL;
+       if (buffer_id >= port->n_buffers)
+               return -EINVAL;
 
        pw_log_trace("%p: recycle buffer %d", impl, buffer_id);
        push_queue(port, &port->queued, &port->buffers[buffer_id]);
@@ -1055,7 +1057,8 @@
 
                if (p->direction == SPA_DIRECTION_INPUT) {
                        res |= SPA_STATUS_NEED_DATA;
-                       if (SPA_UNLIKELY(io->status != SPA_STATUS_HAVE_DATA))
+                       if (SPA_UNLIKELY(io->status != SPA_STATUS_HAVE_DATA &&
+                           io->buffer_id != SPA_ID_INVALID))
                                continue;
 
                        /* pop buffer to recycle */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/src/pipewire/impl-link.c 
new/pipewire-1.6.5/src/pipewire/impl-link.c
--- old/pipewire-1.6.4/src/pipewire/impl-link.c 2026-04-22 10:30:36.000000000 
+0200
+++ new/pipewire-1.6.5/src/pipewire/impl-link.c 2026-05-13 16:58:43.000000000 
+0200
@@ -601,10 +601,10 @@
 error:
        pw_context_debug_port_params(context, node[0],
                        info[0]->port->direction, port_id[0],
-                       SPA_PARAM_EnumFormat, res, "input format (%s)", error);
+                       SPA_PARAM_EnumFormat, res, "%s format (%s)", dir[0], 
error);
        pw_context_debug_port_params(context, node[1],
                        info[1]->port->direction, port_id[1],
-                       SPA_PARAM_EnumFormat, res, "output format (%s)", error);
+                       SPA_PARAM_EnumFormat, res, "%s format (%s)", dir[1], 
error);
        link_update_state(this, PW_LINK_STATE_ERROR, res, error);
        free(format);
        return res;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/src/pipewire/stream.c 
new/pipewire-1.6.5/src/pipewire/stream.c
--- old/pipewire-1.6.4/src/pipewire/stream.c    2026-04-22 10:30:36.000000000 
+0200
+++ new/pipewire-1.6.5/src/pipewire/stream.c    2026-05-13 16:58:43.000000000 
+0200
@@ -1082,6 +1082,8 @@
 static int impl_port_reuse_buffer(void *object, uint32_t port_id, uint32_t 
buffer_id)
 {
        struct stream *d = object;
+       if (buffer_id >= d->n_buffers)
+               return -EINVAL;
        pw_log_trace("%p: recycle buffer %d", d, buffer_id);
        queue_push(d, &d->queued, &d->buffers[buffer_id]);
        return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/src/pipewire/utils.c 
new/pipewire-1.6.5/src/pipewire/utils.c
--- old/pipewire-1.6.4/src/pipewire/utils.c     2026-04-22 10:30:36.000000000 
+0200
+++ new/pipewire-1.6.5/src/pipewire/utils.c     2026-05-13 16:58:43.000000000 
+0200
@@ -368,6 +368,10 @@
 #ifdef HAVE_REALLOCARRAY
        return reallocarray(ptr, nmemb, size);
 #else
+       if (size > 0 && nmemb > SIZE_MAX / size) {
+               errno = ENOMEM;
+               return NULL;
+       }
        return realloc(ptr, nmemb * size);
 #endif
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/src/tests/test-security-context.c 
new/pipewire-1.6.5/src/tests/test-security-context.c
--- old/pipewire-1.6.4/src/tests/test-security-context.c        2026-04-22 
10:30:36.000000000 +0200
+++ new/pipewire-1.6.5/src/tests/test-security-context.c        2026-05-13 
16:58:43.000000000 +0200
@@ -125,7 +125,7 @@
 
        unlink(temp);
 
-       listen_fd = socket(AF_UNIX, SOCK_STREAM, 0);
+       listen_fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
        spa_assert_se(listen_fd >= 0);
 
        sockaddr.sun_family = AF_UNIX;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/src/tools/midifile.c 
new/pipewire-1.6.5/src/tools/midifile.c
--- old/pipewire-1.6.4/src/tools/midifile.c     2026-04-22 10:30:36.000000000 
+0200
+++ new/pipewire-1.6.5/src/tools/midifile.c     2026-05-13 16:58:43.000000000 
+0200
@@ -177,6 +177,12 @@
        if ((res = read_mthd(mf)) < 0)
                goto exit_close;
 
+       if (mf->info.ntracks > SPA_N_ELEMENTS(mf->tracks) ||
+           mf->info.division == 0) {
+               res = -EINVAL;
+               goto exit_close;
+       }
+
        mf->tempo = DEFAULT_TEMPO;
        mf->tick = 0;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/src/tools/pw-container.c 
new/pipewire-1.6.5/src/tools/pw-container.c
--- old/pipewire-1.6.4/src/tools/pw-container.c 2026-04-22 10:30:36.000000000 
+0200
+++ new/pipewire-1.6.5/src/tools/pw-container.c 2026-05-13 16:58:43.000000000 
+0200
@@ -242,7 +242,7 @@
        close(res);
        unlink(temp);
 
-       listen_fd = socket(AF_UNIX, SOCK_STREAM, 0);
+       listen_fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0);
        if (listen_fd < 0) {
                fprintf(stderr, "can't make unix socket: %m\n");
                return -1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pipewire-1.6.4/test/test-logger.c 
new/pipewire-1.6.5/test/test-logger.c
--- old/pipewire-1.6.4/test/test-logger.c       2026-04-22 10:30:36.000000000 
+0200
+++ new/pipewire-1.6.5/test/test-logger.c       2026-05-13 16:58:43.000000000 
+0200
@@ -344,7 +344,7 @@
        /* The error message during pw_init() will go to stderr because no
         * logger has been set up yet. Intercept that in our temp file */
        pwtest_mkstemp(fname);
-       fd = open(fname, O_RDWR);
+       fd = open(fname, O_RDWR | O_CLOEXEC);
        pwtest_errno_ok(fd);
        rc = dup2(fd, STDERR_FILENO);
        setlinebuf(stderr);

++++++ pipewire.obsinfo ++++++
--- /var/tmp/diff_new_pack.wIuEKR/_old  2026-05-16 19:25:29.932428570 +0200
+++ /var/tmp/diff_new_pack.wIuEKR/_new  2026-05-16 19:25:29.936428734 +0200
@@ -1,5 +1,5 @@
 name: pipewire
-version: 1.6.4
-mtime: 1776846636
-commit: 3e67b89a1adb4c98c248668189f8e21c6ddc68be
+version: 1.6.5
+mtime: 1778684323
+commit: 55848f4260a2d2302f9f6bd304d82616976ef9af
 

Reply via email to