From: Vsevolod Stakhov Date: Sat, 28 Sep 2019 14:27:52 +0000 (+0100) Subject: [Minor] Oops, fix parsing of the Unix addresses X-Git-Tag: 2.0~100 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=916a45c6f97ae530a856143390abc602ad9b4d5e;p=rspamd.git [Minor] Oops, fix parsing of the Unix addresses --- diff --git a/src/libutil/addr.c b/src/libutil/addr.c index f6aed8bf4..138dc1318 100644 --- a/src/libutil/addr.c +++ b/src/libutil/addr.c @@ -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,