modules: use sockaddr_storage for socket address

sockaddr_in only works for ipv4, for ipv6, the address will be truncated
and then cause a stack overread in inet_ntop.
This commit is contained in:
Wim Taymans 2026-05-12 09:15:46 +02:00
parent 4366621b78
commit 9843ee858f

View file

@ -576,7 +576,7 @@ on_connect(void *data, int fd, uint32_t mask)
{
struct server *server = data;
struct impl *impl = server->impl;
struct sockaddr_in addr;
struct sockaddr_storage addr;
socklen_t addrlen;
int client_fd, val;
struct client *client = NULL;