From 9aa3de9dcf054bc80283a1e1ccb0ec50bb6e493b Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 30 Jun 2015 13:33:35 +0100 Subject: [PATCH] Fix regexp_search invocation. --- src/libmime/mime_expressions.c | 12 ++++++------ src/libutil/expression.c | 2 +- src/plugins/surbl.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/libmime/mime_expressions.c b/src/libmime/mime_expressions.c index 6152032a2..5b52cb8e0 100644 --- a/src/libmime/mime_expressions.c +++ b/src/libmime/mime_expressions.c @@ -732,7 +732,7 @@ rspamd_mime_regexp_element_process (struct rspamd_task *task, len = max_re_data; } - while (rspamd_regexp_search (re->regexp, data, len, &start, &end, raw)) { + while (rspamd_regexp_search (re->regexp, data, len, &start, &end, raw, NULL)) { r++; if (!re->is_multiple) { @@ -1783,7 +1783,7 @@ match_smtp_data (struct rspamd_task *task, if ((r = rspamd_task_re_cache_check (task, rspamd_regexp_get_pattern (re))) == -1) { - r = rspamd_regexp_search (re, what, 0, NULL, NULL, FALSE); + r = rspamd_regexp_search (re, what, 0, NULL, NULL, FALSE, NULL); rspamd_task_re_cache_add (task, rspamd_regexp_get_pattern (re), r); } return r; @@ -1976,7 +1976,7 @@ rspamd_content_type_compare_param (struct rspamd_task * task, if ((r = rspamd_task_re_cache_check (task, rspamd_regexp_get_pattern (re))) == -1) { r = rspamd_regexp_search (re, param_data, 0, - NULL, NULL, FALSE); + NULL, NULL, FALSE, NULL); rspamd_task_re_cache_add (task, rspamd_regexp_get_pattern (re), r); } @@ -2150,7 +2150,7 @@ rspamd_content_type_check (struct rspamd_task *task, if ((r = rspamd_task_re_cache_check (task, rspamd_regexp_get_pattern (re))) == -1) { r = rspamd_regexp_search (re, param_data, 0, - NULL, NULL, FALSE); + NULL, NULL, FALSE, NULL); rspamd_task_re_cache_add (task, rspamd_regexp_get_pattern (re), r); } @@ -2216,7 +2216,7 @@ compare_subtype (struct rspamd_task *task, GMimeContentType * ct, if ((r = rspamd_task_re_cache_check (task, rspamd_regexp_get_pattern (re))) == -1) { r = rspamd_regexp_search (re, ct->subtype, 0, - NULL, NULL, FALSE); + NULL, NULL, FALSE, NULL); rspamd_task_re_cache_add (task, rspamd_regexp_get_pattern (re), r); } @@ -2277,7 +2277,7 @@ common_has_content_part (struct rspamd_task * task, if ((r = rspamd_task_re_cache_check (task, rspamd_regexp_get_pattern (re))) == -1) { r = rspamd_regexp_search (re, ct->type, 0, - NULL, NULL, FALSE); + NULL, NULL, FALSE, NULL); /* Also check subtype and length of the part */ if (r && param_subtype) { r = compare_len (part, min_len, max_len) && diff --git a/src/libutil/expression.c b/src/libutil/expression.c index 7faebb547..6e58fa40d 100644 --- a/src/libutil/expression.c +++ b/src/libutil/expression.c @@ -593,7 +593,7 @@ rspamd_parse_expression (const gchar *line, gsize len, state = PARSE_OP; } else if (rspamd_regexp_search (num_re, p, end - p, NULL, NULL, - FALSE)) { + FALSE, NULL)) { c = p; state = PARSE_LIM; } diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c index e8e7ea7bb..245d1cedc 100644 --- a/src/plugins/surbl.c +++ b/src/plugins/surbl.c @@ -1098,7 +1098,7 @@ surbl_tree_url_callback (gpointer key, gpointer value, void *data) } } else if (rspamd_regexp_search (re, url->string, 0, - NULL, NULL, TRUE)) { + NULL, NULL, TRUE, NULL)) { found = TRUE; } -- 2.39.5