From b5f65acbd6a62aa60431e3b8b19aeb6d3b56821a Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 26 Mar 2015 14:13:31 +0000 Subject: [PATCH] Fix socket length calculations for UDP sockets. --- src/libutil/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libutil/addr.c b/src/libutil/addr.c index 38e5ac4fa..3e2ec9458 100644 --- a/src/libutil/addr.c +++ b/src/libutil/addr.c @@ -558,7 +558,7 @@ rspamd_inet_address_recvfrom (gint fd, void *buf, gsize len, gint fl, if (target) { addr = rspamd_inet_addr_create (su.sa.sa_family); - addr->slen = len; + addr->slen = slen; if (addr->af == AF_UNIX) { addr->u.un = g_slice_alloc (sizeof (*addr->u.un)); -- 2.39.5