From: Vsevolod Stakhov Date: Fri, 23 Sep 2016 11:38:45 +0000 (+0100) Subject: [Fix] Fix crash on OpenBSD in `url_email_start` X-Git-Tag: 1.4.0~390 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b33ef8ab63be63ba712a456c846fe427c347d37;p=thirdparty%2Frspamd.git [Fix] Fix crash on OpenBSD in `url_email_start` Issue: #969 MFH: true --- diff --git a/src/libserver/url.c b/src/libserver/url.c index cc6cfbb3a8..7231934fd2 100644 --- a/src/libserver/url.c +++ b/src/libserver/url.c @@ -1925,9 +1925,13 @@ url_email_start (struct url_callback_data *cb, cb->last_at = NULL; return FALSE; } + else if (pos == cb->begin) { + /* Just @ at the start of input */ + return FALSE; + } } - if (pos > cb->begin - 1) { + if (pos >= cb->begin + 1) { match->st = *(pos - 1); } else {