]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Oops, fix parsing of the Unix addresses
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 28 Sep 2019 14:27:52 +0000 (15:27 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 28 Sep 2019 14:27:52 +0000 (15:27 +0100)
src/libutil/addr.c

index f6aed8bf4fbadb31b685bb4eb652cdbdde55dd45..138dc1318a9e7a762ba4314a8b141956a5e95f43 100644 (file)
@@ -339,6 +339,12 @@ rspamd_parse_unix_path (rspamd_inet_addr_t **target,
                if (tokens[0] == NULL) {
                        return FALSE;
                }
+
+               rspamd_strlcpy (addr->u.un->addr.sun_path, tokens[0],
+                               sizeof (addr->u.un->addr.sun_path));
+#if defined(FREEBSD) || defined(__APPLE__)
+               addr->u.un->addr.sun_len = SUN_LEN (&addr->u.un->addr);
+#endif
        }
        else {
                rspamd_strlcpy (addr->u.un->addr.sun_path, src,