From 34082326a5da24018f4ff9067a047eb326b78230 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 13 Mar 2015 13:44:35 +0000 Subject: [PATCH] Check boundary prior to dereferencing. --- src/libserver/url.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libserver/url.c b/src/libserver/url.c index 4b255d856..a824ef548 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 ++; -- 2.39.5