summaryrefslogtreecommitdiffstats
path: root/src/libutil/addr.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-07 00:20:56 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-07 00:20:56 +0000
commit9154d4f68d648fe643070f3c7a8a1880d039d335 (patch)
tree2dece15d577d1ace5a3ce48989e26e7762424ed8 /src/libutil/addr.c
parent73ea10e0646c8ad4990b16fdf04474e7effb6f84 (diff)
downloadrspamd-9154d4f68d648fe643070f3c7a8a1880d039d335.tar.gz
rspamd-9154d4f68d648fe643070f3c7a8a1880d039d335.zip
Fix inet_addr structure length in memcpy
Diffstat (limited to 'src/libutil/addr.c')
-rw-r--r--src/libutil/addr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/addr.c b/src/libutil/addr.c
index 7d0d5fef9..039474378 100644
--- a/src/libutil/addr.c
+++ b/src/libutil/addr.c
@@ -845,7 +845,7 @@ rspamd_inet_address_recvfrom (gint fd, void *buf, gsize len, gint fl,
memcpy (&addr->u.un->addr, &su.su, sizeof (struct sockaddr_un));
}
else {
- memcpy (&addr->u.in.addr, &su, MIN (len, sizeof (addr->u.in.addr)));
+ memcpy (&addr->u.in.addr, &su.sa, MIN (slen, sizeof (addr->u.in.addr)));
}
*target = addr;