aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-09-23 12:38:45 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-09-23 12:38:45 +0100
commit1b33ef8ab63be63ba712a456c846fe427c347d37 (patch)
tree4d69e89a12ae151b3157c0f1c7fe348a64fcedfa /src
parentfa29b28616ece2ded9956c7da693412b61542daa (diff)
downloadrspamd-1b33ef8ab63be63ba712a456c846fe427c347d37.tar.gz
rspamd-1b33ef8ab63be63ba712a456c846fe427c347d37.zip
[Fix] Fix crash on OpenBSD in `url_email_start`
Issue: #969 MFH: true
Diffstat (limited to 'src')
-rw-r--r--src/libserver/url.c6
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 {