diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-26 12:07:29 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-26 12:07:29 +0100 |
commit | 66d8b6e43447eeebe1ca1c2f79fa4b52173a1b6b (patch) | |
tree | 45dc9e90027450559bebecfe74c6e6b74d5d6524 /src/libutil/addr.c | |
parent | f648223e11b724cb485fabd8d344fec3b3e382c5 (diff) | |
download | rspamd-66d8b6e43447eeebe1ca1c2f79fa4b52173a1b6b.tar.gz rspamd-66d8b6e43447eeebe1ca1c2f79fa4b52173a1b6b.zip |
[Fix] Do not call implicit strlen to avoid issues
Diffstat (limited to 'src/libutil/addr.c')
-rw-r--r-- | src/libutil/addr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libutil/addr.c b/src/libutil/addr.c index 9e2e76f23..7ab5e11ee 100644 --- a/src/libutil/addr.c +++ b/src/libutil/addr.c @@ -689,13 +689,13 @@ rspamd_parse_inet_address_common (rspamd_inet_addr_t **target, guint iplen; gulong portnum; - g_assert (src != NULL); - g_assert (target != NULL); - if (srclen == 0) { - srclen = strlen (src); + return FALSE; } + g_assert (src != NULL); + g_assert (target != NULL); + rspamd_ip_check_ipv6 (); if (src[0] == '/' || src[0] == '.') { @@ -1387,7 +1387,7 @@ rspamd_parse_host_port_priority (const gchar *str, } } - if (!rspamd_parse_inet_address (&cur_addr, str, 0)) { + if (!rspamd_parse_inet_address (&cur_addr, str, strlen (str))) { msg_err_pool_check ("cannot parse unix socket definition %s: %s", str, strerror (errno)); |