pipewire/src
Wim Taymans e474303991 security: add missing NULL checks after strdup/strndup in pw_split_strv
Memory Safety: Medium

In pw_split_strv(), the return values of strndup() and strdup() were
passed directly to pw_array_add_ptr() without checking for NULL. If
memory allocation fails, NULL pointers would be stored in the string
array and later dereferenced by callers iterating the result.

The return value of pw_array_add_ptr() was also not checked, which
could lead to silently dropped strings.

Fix by checking both allocation and array insertion return values,
and properly cleaning up all previously allocated strings on failure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-29 11:06:20 +02:00
..
daemon filter-chain: update virtual surround with convolver2 2026-04-21 17:03:55 +02:00
examples impl-node: accept more node.passive values 2026-03-12 17:25:36 +01:00
gst gst: fix crop height typo in pipewiresink do_send_buffer 2026-04-21 20:19:24 +01:00
modules security: add missing NULL check after calloc in sendspin-recv 2026-04-28 13:03:21 +02:00
pipewire security: add missing NULL checks after strdup/strndup in pw_split_strv 2026-04-29 11:06:20 +02:00
tests stream: return -EIO when doing get_time in != STREAMING 2026-02-12 12:26:33 +01:00
tools security: add missing NULL check after strdup in pw-dump 2026-04-29 11:06:18 +02:00
meson.build meson.build: fix compile with -Dexamples=disabled 2023-11-28 10:18:25 +00:00