]> source.dussan.org Git - rspamd.git/commitdiff
Fix possible illegal memory access.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 21 May 2015 13:10:52 +0000 (14:10 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 21 May 2015 13:21:06 +0000 (14:21 +0100)
src/libserver/url.c

index a52011346b344f6746ff41712f4a9bead87be581..2bab0ca4fe58f71728f76c11bbab1a9632b81a8f 100644 (file)
@@ -1384,7 +1384,7 @@ url_email_end (const gchar *begin,
        }
 
        /* Strip strange symbols at the end */
-       if (got_at) {
+       if (got_at && p < end) {
                while (p >= match->m_begin &&
                                (!is_domain (*p) || *p == '.' || *p == '_')) {
                        p --;