diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-09-23 12:38:45 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-09-23 12:38:45 +0100 |
commit | 1b33ef8ab63be63ba712a456c846fe427c347d37 (patch) | |
tree | 4d69e89a12ae151b3157c0f1c7fe348a64fcedfa /src/libserver/url.c | |
parent | fa29b28616ece2ded9956c7da693412b61542daa (diff) | |
download | rspamd-1b33ef8ab63be63ba712a456c846fe427c347d37.tar.gz rspamd-1b33ef8ab63be63ba712a456c846fe427c347d37.zip |
[Fix] Fix crash on OpenBSD in `url_email_start`
Issue: #969
MFH: true
Diffstat (limited to 'src/libserver/url.c')
-rw-r--r-- | src/libserver/url.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libserver/url.c b/src/libserver/url.c index cc6cfbb3a..7231934fd 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 { |