diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-05-25 12:38:49 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-05-25 12:38:49 +0100 |
commit | 2576635a55ee85c9542d3292d1e6551a5b75ea48 (patch) | |
tree | 99670195c4ebf688f49036ae1fc22eaa3b867f45 /src/libutil/addr.c | |
parent | c36baca06837867a85b57748e334f660708941d5 (diff) | |
download | rspamd-2576635a55ee85c9542d3292d1e6551a5b75ea48.tar.gz rspamd-2576635a55ee85c9542d3292d1e6551a5b75ea48.zip |
[CritFix] Zero fill sockaddr_un
Diffstat (limited to 'src/libutil/addr.c')
-rw-r--r-- | src/libutil/addr.c | 4 |
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; |