From: Vsevolod Stakhov Date: Thu, 15 Oct 2015 14:34:10 +0000 (+0100) Subject: Do not output broken emails. X-Git-Tag: 1.0.6~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7b53ccc5d7271a7f3af4a60dc3e00c63cb6385cf;p=rspamd.git Do not output broken emails. --- diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index 99a363166..32c420131 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -709,8 +709,11 @@ emails_protocol_cb (gpointer key, gpointer value, gpointer ud) struct rspamd_url *url = value; ucl_object_t *obj; - obj = ucl_object_fromlstring (url->user, url->userlen + url->hostlen + 1); - ucl_array_append (cb->top, obj); + if (url->userlen > 0 && url->hostlen > 0) { + obj = ucl_object_fromlstring (url->user, + url->userlen + url->hostlen + 1); + ucl_array_append (cb->top, obj); + } } static ucl_object_t *