len = strlen (data);
}
- if (max_re_data != 0 && len > max_re_data) {
- msg_info ("<%s> skip data of size %Hud",
- task->message_id,
- len);
-
- return 0;
+ if (max_re_data > 0 && len > max_re_data) {
+ len = max_re_data;
}
while (rspamd_regexp_search (re->regexp, data, len, &start, &end, raw)) {
if (g_ascii_strncasecmp (ucl_object_key (value), "max_size",
sizeof ("max_size") - 1) == 0) {
regexp_module_ctx->max_size = ucl_obj_toint (value);
+ rspamd_mime_expression_set_re_limit (regexp_module_ctx->max_size);
}
else if (g_ascii_strncasecmp (ucl_object_key (value), "max_threads",
sizeof ("max_threads") - 1) == 0) {