aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/regexp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/regexp.c')
-rw-r--r--src/plugins/regexp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c
index 23ec3908c..45f07f9e7 100644
--- a/src/plugins/regexp.c
+++ b/src/plugins/regexp.c
@@ -335,6 +335,11 @@ process_regexp (struct rspamd_regexp *re, struct worker_task *task)
cur = g_list_first (task->text_parts);
while (cur) {
part = (struct mime_text_part *)cur->data;
+ /* Skip empty parts */
+ if (part->is_empty) {
+ cur = g_list_next (cur);
+ continue;
+ }
if (part->is_raw) {
regexp = re->raw_regexp;
}
@@ -371,6 +376,11 @@ process_regexp (struct rspamd_regexp *re, struct worker_task *task)
cur = g_list_first (task->text_parts);
while (cur) {
part = (struct mime_text_part *)cur->data;
+ /* Skip empty parts */
+ if (part->is_empty) {
+ cur = g_list_next (cur);
+ continue;
+ }
if (part->is_raw) {
regexp = re->raw_regexp;
}