From: Vsevolod Stakhov Date: Thu, 21 May 2015 13:10:52 +0000 (+0100) Subject: Fix possible illegal memory access. X-Git-Tag: 0.9.4~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=199853aa8371347c2d775e1d773170ff2b5ff210;p=rspamd.git Fix possible illegal memory access. --- diff --git a/src/libserver/url.c b/src/libserver/url.c index a52011346..2bab0ca4f 100644 --- a/src/libserver/url.c +++ b/src/libserver/url.c @@ -1384,7 +1384,7 @@ url_email_end (const gchar *begin, } /* Strip strange symbols at the end */ - if (got_at) { + if (got_at && p < end) { while (p >= match->m_begin && (!is_domain (*p) || *p == '.' || *p == '_')) { p --;