pipewire/src
Barnabás Pőcze ae34b68e3a pulse-server: message: improve resizing logic
As Coverity points out, `ensure_size()` is not fully correct.

Let us assume that the message already has some allocated storage,
and the `realloc()` call in the next `ensure_size()` invocation fails.
In that case `message::data` is freed, but the pointer is left behind.
If another `ensure_size()` call is made, then `realloc()` will be called
(since the previous call left `message::allocated` as zero), but the
first argument of the `realloc()` call will be a dangling pointer.

In order to avoid the above, first of all, clear `message::data` after
a failed `realloc()` call, and immediately return `-ENOMEM` if
`message::length` is greater than `message::allocated` since
that signals if the message has even run into an out-of-memory
situation.
2022-06-16 18:38:30 +00:00
..
daemon settings: also allow 44.1KHz as samplerate 2022-04-28 17:02:27 +02:00
examples examples: fix modifier handling 2022-06-08 15:13:03 +02:00
gst gst: add client-properties 2022-06-03 13:00:52 +02:00
modules pulse-server: message: improve resizing logic 2022-06-16 18:38:30 +00:00
pipewire stream: Fix memory leak 2022-06-10 11:50:40 +02:00
tests Cleanup argument names in methods and events interfaces 2022-04-15 10:11:49 +02:00
tools pw-cli: Work without readline too 2022-06-15 16:37:01 +02:00
meson.build treewide: meson.build: use feature.allowed() 2022-02-04 00:15:59 +01:00