]> source.dussan.org Git - rspamd.git/commitdiff
Check boundary prior to dereferencing.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 13 Mar 2015 13:44:35 +0000 (13:44 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 13 Mar 2015 13:45:16 +0000 (13:45 +0000)
src/libserver/url.c

index e43ff37241587e48b1440161103d55627328f1be..a3dbf92f4b6b254aabe04adba2d59d21d31ca7c5 100644 (file)
@@ -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 ++;