summaryrefslogtreecommitdiffstats
path: root/src/libserver/protocol.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-15 18:25:15 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-11-15 18:25:15 +0000
commit4d436a67f1c15b4c1e47864a7d7f267162a7da79 (patch)
treef504e902c083d5f4324259c855cfce55047e53e3 /src/libserver/protocol.c
parentc234e5bc9c8b19625009d3925f37875e5fa820d4 (diff)
downloadrspamd-4d436a67f1c15b4c1e47864a7d7f267162a7da79.tar.gz
rspamd-4d436a67f1c15b4c1e47864a7d7f267162a7da79.zip
[Fix] Fix issues found
Diffstat (limited to 'src/libserver/protocol.c')
-rw-r--r--src/libserver/protocol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c
index c457fc455..e66101bb4 100644
--- a/src/libserver/protocol.c
+++ b/src/libserver/protocol.c
@@ -925,11 +925,11 @@ urls_protocol_cb (gpointer key, gpointer value, gpointer ud)
goffset err_offset;
- if ((err_offset = rspamd_fast_utf8_validate (url->host, url->hostlen) == 0)) {
+ if ((err_offset = rspamd_fast_utf8_validate (url->host, url->hostlen)) == 0) {
obj = ucl_object_fromlstring (url->host, url->hostlen);
}
else {
- obj = ucl_object_fromlstring (url->host, err_offset);
+ obj = ucl_object_fromlstring (url->host, err_offset - 1);
}
}
else {