const gchar *pos, *newline_pos = NULL;
struct url_callback_data *cb = context;
+ pos = text + match_pos;
+
+ if (cb->fin > pos) {
+ /* Already seen */
+ return 0;
+ }
+
matcher = &g_array_index (url_scanner->matchers, struct url_matcher,
strnum);
return 0;
}
- pos = text + match_pos;
memset (&m, 0, sizeof (m));
m.m_begin = text + match_start;
m.m_len = match_pos - match_start;
gint rc;
rspamd_mempool_t *pool;
+ pos = text + match_pos;
+
+ if (cb->fin > pos) {
+ /* Already seen */
+ return 0;
+ }
+
matcher = &g_array_index (url_scanner->matchers, struct url_matcher,
strnum);
pool = cb->pool;
}
memset (&m, 0, sizeof (m));
- pos = text + match_pos;
+
/* Find the next newline after our pos */
if (cb->newlines && cb->newlines->len > 0) {