summaryrefslogtreecommitdiffstats
path: root/src/libserver/url.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-13 13:44:35 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-13 13:45:16 +0000
commitb34ae124cacc391595705a7e2d0d9825877730e5 (patch)
tree5c74eb3107a78cb04a0851c4d1be331c3927a47d /src/libserver/url.c
parenta1f268befed0cd5ef02d93a2420573ea2821406c (diff)
downloadrspamd-b34ae124cacc391595705a7e2d0d9825877730e5.tar.gz
rspamd-b34ae124cacc391595705a7e2d0d9825877730e5.zip
Check boundary prior to dereferencing.
Diffstat (limited to 'src/libserver/url.c')
-rw-r--r--src/libserver/url.c4
1 files changed, 2 insertions, 2 deletions
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 ++;