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:
Wim Taymans 2026-04-30 17:28:02 +02:00
parent c38a32e2e1
commit dac6b4f2c5

View file

@ -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));