mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-05 06:46:28 -04:00
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:
parent
47ca937905
commit
6cc92c0e2b
5 changed files with 14 additions and 1 deletions
|
|
@ -351,7 +351,7 @@ static int process_input(struct tunnel *t)
|
|||
int res = 0;
|
||||
|
||||
while (true) {
|
||||
res = read(t->source->fd, buffer, sizeof(buffer));
|
||||
res = read(t->source->fd, buffer, sizeof(buffer) - 1);
|
||||
if (res == 0)
|
||||
return -EPIPE;
|
||||
if (res < 0) {
|
||||
|
|
@ -362,6 +362,7 @@ static int process_input(struct tunnel *t)
|
|||
return res;
|
||||
break;
|
||||
}
|
||||
buffer[res] = '\0';
|
||||
}
|
||||
|
||||
pw_log_info("received: %s", buffer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue