Projects
home:zaitor:branches:Essentials
pipewire-aptx
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
pipewire-aptx.spec
Changed
@@ -8,7 +8,7 @@ %define minimum_version 1.6.0 Name: pipewire-aptx -Version: 1.6.4 +Version: 1.6.5 Release: 0 Summary: PipeWire Bluetooth aptX codec plugin License: MIT
View file
_service:download_files:pipewire-1.6.4.tar.bz2/NEWS -> _service:download_files:pipewire-1.6.5.tar.bz2/NEWS
Changed
@@ -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
View file
_service:download_files:pipewire-1.6.4.tar.bz2/meson.build -> _service:download_files:pipewire-1.6.5.tar.bz2/meson.build
Changed
@@ -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',
View file
_service:download_files:pipewire-1.6.4.tar.bz2/pipewire-alsa/alsa-plugins/pcm_pipewire.c -> _service:download_files:pipewire-1.6.5.tar.bz2/pipewire-alsa/alsa-plugins/pcm_pipewire.c
Changed
@@ -1244,7 +1244,7 @@ return size; } -static cookie_io_functions_t io_funcs = { +static const cookie_io_functions_t io_funcs = { .write = log_write, };
View file
_service:download_files:pipewire-1.6.4.tar.bz2/spa/plugins/alsa/alsa-pcm.c -> _service:download_files:pipewire-1.6.5.tar.bz2/spa/plugins/alsa/alsa-pcm.c
Changed
@@ -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->tag0); - free(state->tag1); + spa_clear_ptr(state->tag0, free); + spa_clear_ptr(state->tag1, 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;
View file
_service:download_files:pipewire-1.6.4.tar.bz2/spa/plugins/alsa/compress-offload-api.c -> _service:download_files:pipewire-1.6.5.tar.bz2/spa/plugins/alsa/compress-offload-api.c
Changed
@@ -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;
View file
_service:download_files:pipewire-1.6.4.tar.bz2/spa/plugins/alsa/mixer/paths/analog-output-headphones.conf -> _service:download_files:pipewire-1.6.5.tar.bz2/spa/plugins/alsa/mixer/paths/analog-output-headphones.conf
Changed
@@ -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.
View file
_service:download_files:pipewire-1.6.4.tar.bz2/spa/plugins/alsa/mixer/paths/analog-output-lineout.conf -> _service:download_files:pipewire-1.6.5.tar.bz2/spa/plugins/alsa/mixer/paths/analog-output-lineout.conf
Changed
@@ -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
View file
_service:download_files:pipewire-1.6.4.tar.bz2/spa/plugins/audioconvert/audioadapter.c -> _service:download_files:pipewire-1.6.5.tar.bz2/spa/plugins/audioconvert/audioadapter.c
Changed
@@ -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);
View file
_service:download_files:pipewire-1.6.4.tar.bz2/spa/plugins/audioconvert/audioconvert.c -> _service:download_files:pipewire-1.6.5.tar.bz2/spa/plugins/audioconvert/audioconvert.c
Changed
@@ -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);
View file
_service:download_files:pipewire-1.6.4.tar.bz2/spa/plugins/audiomixer/mixer-dsp.c -> _service:download_files:pipewire-1.6.5.tar.bz2/spa/plugins/audiomixer/mixer-dsp.c
Changed
@@ -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,
View file
_service:download_files:pipewire-1.6.4.tar.bz2/spa/plugins/avb/avb-pcm.c -> _service:download_files:pipewire-1.6.5.tar.bz2/spa/plugins/avb/avb-pcm.c
Changed
@@ -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;
View file
_service:download_files:pipewire-1.6.4.tar.bz2/spa/plugins/bluez5/backend-native.c -> _service:download_files:pipewire-1.6.5.tar.bz2/spa/plugins/bluez5/backend-native.c
Changed
@@ -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;
View file
_service:download_files:pipewire-1.6.4.tar.bz2/spa/plugins/filter-graph/filter-graph.c -> _service:download_files:pipewire-1.6.5.tar.bz2/spa/plugins/filter-graph/filter-graph.c
Changed
@@ -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->inputgraph->n_input++; spa_log_info(impl->log, "input port %s%d:%s", first->name, i, d->portsdesc->inputj.name); @@ -1901,6 +1908,10 @@ for (n = 0; n < graph->n_input_names; n++) { pname = graph->input_namesn; if (spa_streq(pname, "null")) { + if (graph->n_input >= input_count) { + res = -ENOSPC; + goto error; + } gp = &graph->inputgraph->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->portsport->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->portsport->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->outputgraph->n_output++; spa_log_info(impl->log, "output port %s%d:%s", last->name, i, d->portsdesc->outputj.name); @@ -1982,6 +2005,10 @@ } else { for (n = 0; n < graph->n_output_names; n++) { pname = graph->output_namesn; + if (graph->n_output >= output_count) { + res = -ENOSPC; + goto error; + } gp = &graph->outputgraph->n_output; if (spa_streq(pname, "null")) { gp->desc = NULL; @@ -2204,6 +2231,10 @@ if ((res = load_node(graph, &it1)) < 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, &it1) > 0) { if ((res = parse_link(graph, &it1)) < 0) @@ -2256,7 +2287,6 @@ else graph->default_outputs = last->desc->n_output; - return 0; }
View file
_service:download_files:pipewire-1.6.4.tar.bz2/spa/plugins/filter-graph/plugin_builtin.c -> _service:download_files:pipewire-1.6.5.tar.bz2/spa/plugins/filter-graph/plugin_builtin.c
Changed
@@ -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 *port3; - 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 *argv512; - struct spa_json it2; - const char *value; - int stdin_pipe2; - int stdout_pipe2; - - if (spa_json_begin_array_relax(&it0, command, strlen(command)) <= 0) - return -EINVAL; - - while ((len = spa_json_next(&it0, &value)) > 0) { - char *s; - - if ((s = malloc(len+1)) == NULL) - return -errno; - - spa_json_parse_stringn(value, len, s, len+1); - - argvargc++ = s; - } - argvargc++ = NULL; - - pipe2(stdin_pipe, 0); - pipe2(stdout_pipe, 0); - - impl->write_fd = stdin_pipe1; - impl->read_fd = stdout_pipe0; - - pid = fork(); - - if (pid == 0) { - char buf1024; - 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_pipe0, 0); - dup2(stdout_pipe1, 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(argv0, argv); - - if (res == -1) { - res = -errno; - spa_log_error(impl->log, "execvp error '%s': %m", argv0); - } -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 it2; - const char *val; - char key256; - 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(&it0, config, strlen(config)) <= 0) { - spa_log_error(pl->log, "pipe: config must be an object"); - return NULL; - } - - while ((len = spa_json_object_next(&it0, 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 || command0 == '\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->portPort = DataLocation; -} - -static void pipe_run(void * Instance, unsigned long SampleCount) -{ - struct pipe_impl *impl = Instance; - float *in = impl->port0, *out = impl->port1; - - 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;
View file
_service:download_files:pipewire-1.6.4.tar.bz2/spa/plugins/support/node-driver.c -> _service:download_files:pipewire-1.6.5.tar.bz2/spa/plugins/support/node-driver.c
Changed
@@ -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;
View file
_service:download_files:pipewire-1.6.4.tar.bz2/spa/plugins/v4l2/v4l2-utils.c -> _service:download_files:pipewire-1.6.5.tar.bz2/spa/plugins/v4l2/v4l2-utils.c
Changed
@@ -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",
View file
_service:download_files:pipewire-1.6.4.tar.bz2/spa/plugins/videoconvert/videoadapter.c -> _service:download_files:pipewire-1.6.5.tar.bz2/spa/plugins/videoconvert/videoadapter.c
Changed
@@ -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);
View file
_service:download_files:pipewire-1.6.4.tar.bz2/spa/plugins/vulkan/vulkan-compute-utils.c -> _service:download_files:pipewire-1.6.5.tar.bz2/spa/plugins/vulkan/vulkan-compute-utils.c
Changed
@@ -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; }
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-avb/avdecc.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-avb/avdecc.c
Changed
@@ -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;
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-echo-cancel.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-echo-cancel.c
Changed
@@ -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);
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-example-filter.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-example-filter.c
Changed
@@ -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);
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-filter-chain.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-filter-chain.c
Changed
@@ -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 *cin128; - void *cout128; + const void *cinMAX_DATAS; + void *coutMAX_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->datasi; @@ -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->datasi; data_size = SPA_MIN(data_size, bd->maxsize); @@ -1314,13 +1287,14 @@ data_size, out->requested); } - for (; n_in < impl->n_inputs; i++) - cinn_in++ = NULL; - for (; n_out < impl->n_outputs; i++) - coutn_out++ = NULL; + if (impl->graph_active) { + for (; n_in < impl->n_inputs; i++) + cinn_in++ = NULL; + for (; n_out < impl->n_outputs; i++) + coutn_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->itemsi.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);
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-jack-tunnel.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-jack-tunnel.c
Changed
@@ -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); }
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-loopback.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-loopback.c
Changed
@@ -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);
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-protocol-native/connection.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-protocol-native/connection.c
Changed
@@ -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; p0 = buf->msg.id; - p1 = (buf->msg.opcode << 24) | (size & 0xffffff); + p1 = (buf->msg.opcode << 24) | size; if (impl->version >= 3) { p2 = buf->msg.seq; p3 = buf->msg.n_fds;
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-protocol-native/test-connection.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-protocol-native/test-connection.c
Changed
@@ -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; }
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-protocol-pulse/format.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-protocol-pulse/format.c
Changed
@@ -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(valuesindex); break; case SPA_CHOICE_Enum: + if (index + 1 >= n_values) + return -ENOENT; info->encoding = format_encoding_from_id(valuesindex+1); break; default: @@ -879,6 +880,8 @@ return -EINVAL; while ((*str == '\"' || *str == ',') && (len = strcspn(++str, "\",")) > 0) { + if (map->channels >= CHANNELS_MAX) + return -EINVAL; map->mapmap->channels++ = channel_paname2id(str, len); str += len; }
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-protocol-pulse/message.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-protocol-pulse/message.c
Changed
@@ -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->valuesi)) < 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) {
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-protocol-pulse/module.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-protocol-pulse/module.c
Changed
@@ -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')
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-protocol-pulse/modules/module-combine-sink.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-protocol-pulse/modules/module-combine-sink.c
Changed
@@ -185,7 +185,9 @@ } else { for (i = 0; data->sink_namesi != NULL; i++) { char name1024; - spa_json_encode_string(name, sizeof(name)-1, data->sink_namesi); + if (spa_json_encode_string(name, sizeof(name), data->sink_namesi) >= (int)sizeof(name)) + continue; + fprintf(f, " { matches = { media.class = \"Audio/Sink\" "); fprintf(f, " node.name = %s } ", name); fprintf(f, " actions = { create-stream = { } } }");
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-protocol-pulse/modules/module-echo-cancel.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-protocol-pulse/modules/module-echo-cancel.c
Changed
@@ -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) {
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-protocol-pulse/modules/module-switch-on-connect.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-protocol-pulse/modules/module-switch-on-connect.c
Changed
@@ -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;
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-protocol-pulse/pulse-server.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-protocol-pulse/pulse-server.c
Changed
@@ -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.values0); } 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; items0 = SPA_DICT_ITEM_INIT(PW_KEY_MEDIA_NAME, name); pw_stream_update_properties(stream->stream, @@ -4518,7 +4524,7 @@ commandscommand.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;
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-protocol-pulse/sample-play.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-protocol-pulse/sample-play.c
Changed
@@ -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;
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-protocol-pulse/server.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-protocol-pulse/server.c
Changed
@@ -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)
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-roc-source.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-roc-source.c
Changed
@@ -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;
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-rtp-sap.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-rtp-sap.c
Changed
@@ -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);
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/modules/module-spa-node-factory.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/modules/module-spa-node-factory.c
Changed
@@ -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; }
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/pipewire/conf.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/pipewire/conf.c
Changed
@@ -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");
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/pipewire/filter.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/pipewire/filter.c
Changed
@@ -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->buffersbuffer_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 */
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/pipewire/impl-link.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/pipewire/impl-link.c
Changed
@@ -601,10 +601,10 @@ error: pw_context_debug_port_params(context, node0, info0->port->direction, port_id0, - SPA_PARAM_EnumFormat, res, "input format (%s)", error); + SPA_PARAM_EnumFormat, res, "%s format (%s)", dir0, error); pw_context_debug_port_params(context, node1, info1->port->direction, port_id1, - SPA_PARAM_EnumFormat, res, "output format (%s)", error); + SPA_PARAM_EnumFormat, res, "%s format (%s)", dir1, error); link_update_state(this, PW_LINK_STATE_ERROR, res, error); free(format); return res;
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/pipewire/stream.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/pipewire/stream.c
Changed
@@ -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->buffersbuffer_id); return 0;
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/pipewire/utils.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/pipewire/utils.c
Changed
@@ -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 }
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/tests/test-security-context.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/tests/test-security-context.c
Changed
@@ -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;
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/tools/midifile.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/tools/midifile.c
Changed
@@ -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;
View file
_service:download_files:pipewire-1.6.4.tar.bz2/src/tools/pw-container.c -> _service:download_files:pipewire-1.6.5.tar.bz2/src/tools/pw-container.c
Changed
@@ -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;
View file
_service:download_files:pipewire-1.6.4.tar.bz2/test/test-logger.c -> _service:download_files:pipewire-1.6.5.tar.bz2/test/test-logger.c
Changed
@@ -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);
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.