aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/addr.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-25 12:38:49 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-05-25 12:38:49 +0100
commit2576635a55ee85c9542d3292d1e6551a5b75ea48 (patch)
tree99670195c4ebf688f49036ae1fc22eaa3b867f45 /src/libutil/addr.c
parentc36baca06837867a85b57748e334f660708941d5 (diff)
downloadrspamd-2576635a55ee85c9542d3292d1e6551a5b75ea48.tar.gz
rspamd-2576635a55ee85c9542d3292d1e6551a5b75ea48.zip
[CritFix] Zero fill sockaddr_un
Diffstat (limited to 'src/libutil/addr.c')
-rw-r--r--src/libutil/addr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libutil/addr.c b/src/libutil/addr.c
index 9a278a432..b4ee003ba 100644
--- a/src/libutil/addr.c
+++ b/src/libutil/addr.c
@@ -112,10 +112,8 @@ rspamd_inet_addr_create (gint af)
addr = g_slice_alloc0 (sizeof (rspamd_inet_addr_t));
if (af == AF_UNIX) {
- addr->u.un = g_slice_alloc (sizeof (*addr->u.un));
+ addr->u.un = g_slice_alloc0 (sizeof (*addr->u.un));
addr->slen = sizeof (addr->u.un->addr);
- /* Zero terminate to avoid issues with SUN_LEN */
- addr->u.un->addr.sun_path[0] = '\0';
}
addr->af = af;