mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-02 06:46:36 -04:00
security: clamp negative max-clients config to zero in pulse server
A negative max-clients value in the config is parsed as int then assigned to uint32_t, wrapping to UINT32_MAX and effectively disabling the client limit. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
c38a32e2e1
commit
dac6b4f2c5
1 changed files with 1 additions and 1 deletions
|
|
@ -1065,7 +1065,7 @@ int servers_create_and_start(struct impl *impl, const char *addresses, struct pw
|
|||
continue;
|
||||
}
|
||||
|
||||
server->max_clients = max_clients;
|
||||
server->max_clients = SPA_MAX(max_clients, 0);
|
||||
server->listen_backlog = listen_backlog;
|
||||
memcpy(server->client_access, client_access, sizeof(client_access));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue