From: Vsevolod Stakhov Date: Fri, 13 Mar 2015 13:44:35 +0000 (+0000) Subject: Check boundary prior to dereferencing. X-Git-Tag: 0.9.0~498 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b34ae124cacc391595705a7e2d0d9825877730e5;p=rspamd.git Check boundary prior to dereferencing. --- diff --git a/src/libserver/url.c b/src/libserver/url.c index e43ff3724..a3dbf92f4 100644 --- a/src/libserver/url.c +++ b/src/libserver/url.c @@ -1742,8 +1742,8 @@ url_email_end (const gchar *begin, /* Strip strange symbols at the end */ if (got_at) { - while ((!is_domain (*p) || *p == '.' || *p == '_') && - p >= match->m_begin) { + while (p >= match->m_begin && + (!is_domain (*p) || *p == '.' || *p == '_')) { p --; } p ++;