diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-02-09 16:24:29 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-02-09 16:24:29 +0000 |
commit | 715e1bd6a996cb608b4e740ff5d8e6ca876fa16c (patch) | |
tree | 3d43f9e114b42ff88881f80589b00613f69a2158 /src/libmime/email_addr.c | |
parent | 6508b89d45bd81dfcf6f91a79e56c657b1f3224f (diff) | |
download | rspamd-715e1bd6a996cb608b4e740ff5d8e6ca876fa16c.tar.gz rspamd-715e1bd6a996cb608b4e740ff5d8e6ca876fa16c.zip |
[Minor] Fix lengths when parsing email addresses
Diffstat (limited to 'src/libmime/email_addr.c')
-rw-r--r-- | src/libmime/email_addr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libmime/email_addr.c b/src/libmime/email_addr.c index 4ecfaec76..d534be53f 100644 --- a/src/libmime/email_addr.c +++ b/src/libmime/email_addr.c @@ -355,7 +355,7 @@ rspamd_email_address_from_mime (rspamd_mempool_t *pool, if (seen_at) { /* The whole email is likely address */ - rspamd_smtp_addr_parse (c, p - c + 1, &addr); + rspamd_smtp_addr_parse (c, p - c, &addr); if (addr.flags & RSPAMD_EMAIL_ADDR_VALID) { rspamd_email_address_add (pool, res, &addr, ns); @@ -363,7 +363,7 @@ rspamd_email_address_from_mime (rspamd_mempool_t *pool, else { /* Try heuristic */ if (rspamd_email_address_parse_heuristic (c, - p - c + 1, &addr)) { + p - c, &addr)) { rspamd_email_address_add (pool, res, &addr, ns); } else { @@ -373,7 +373,7 @@ rspamd_email_address_from_mime (rspamd_mempool_t *pool, } else { /* No @ seen */ - g_string_append_len (ns, c, p - c + 1); + g_string_append_len (ns, c, p - c); rspamd_email_address_add (pool, res, NULL, ns); } } |