security: add missing NULL checks and fix error handling in modules

module-access: add NULL check after pw_properties_new for
socket_access.

module-pulse-tunnel: add NULL check after 4MB calloc for ring
buffer.

module-rt: add NULL check after calloc in thread create.

module-rtp-session: add goto error after failed
pw_net_parse_address instead of falling through.

module-snapcast-discover: fix missing null-termination on
network-received data before logging it as a string.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Wim Taymans 2026-04-30 18:38:32 +02:00
parent 47ca937905
commit 6cc92c0e2b
5 changed files with 14 additions and 1 deletions

View file

@ -1417,9 +1417,11 @@ static void on_zeroconf_added(void *data, const void *user, const struct spa_dic
if ((res = pw_net_parse_address(address, port, &sess->ctrl_addr, &sess->ctrl_len)) < 0) {
pw_log_error("invalid address %s: %s", address, spa_strerror(res));
goto error;
}
if ((res = pw_net_parse_address(address, port+1, &sess->data_addr, &sess->data_len)) < 0) {
pw_log_error("invalid address %s: %s", address, spa_strerror(res));
goto error;
}
return;
error: