]> source.dussan.org Git - rspamd.git/commitdiff
[CritFix] Fix parsing of URLs in texts
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 23 Apr 2016 12:14:34 +0000 (13:14 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 23 Apr 2016 12:17:49 +0000 (13:17 +0100)
src/libserver/url.c

index 1c1a5c66e86b25fed7cea3888c62b79872f9a09f..9b7b3660e3d67d3ddc2a3a9b046ba247ae046e8c 100644 (file)
@@ -2141,12 +2141,13 @@ rspamd_url_trie_generic_callback_common (struct rspamd_multipattern *mp,
                return 0;
        }
 
-       pos = text + match_start;
+       pos = text + match_pos;
 
        if (!rspamd_url_trie_is_match (matcher, pos, text + len)) {
                return 0;
        }
 
+       pos = cb->begin + match_start;
        m.pattern = matcher->pattern;
        m.prefix = matcher->prefix;
        m.add_prefix = FALSE;