gtube_pattern_no_action,
RSPAMD_MULTIPATTERN_DEFAULT);
- g_assert (rspamd_multipattern_compile (gtube_matcher, NULL));
+ GError *err = NULL;
+ rspamd_multipattern_compile (gtube_matcher, &err);
+
+ if (err != NULL) {
+ /* It will be expensive, but I don't care, still better than to abort */
+ msg_err ("cannot compile gtube matcher: %s", err->message);
+ g_error_free (err);
+ }
}
if (part->utf_content.len >= sizeof (gtube_pattern_reject) &&
g_assert (lib_ctx->mp_boundary != NULL);
rspamd_multipattern_add_pattern (lib_ctx->mp_boundary, "\r--", 0);
rspamd_multipattern_add_pattern (lib_ctx->mp_boundary, "\n--", 0);
- g_assert (rspamd_multipattern_compile (lib_ctx->mp_boundary, NULL));
+
+ GError *err = NULL;
+ if (!rspamd_multipattern_compile (lib_ctx->mp_boundary, &err)) {
+ msg_err ("fatal error: cannot compile multipattern for mime parser boundaries: %e", err);
+ g_error_free (err);
+ g_abort();
+ }
ottery_rand_bytes (lib_ctx->hkey, sizeof (lib_ctx->hkey));
}
if (url_scanner->search_trie_full) {
if (!rspamd_multipattern_compile (url_scanner->search_trie_full, &err)) {
msg_err ("cannot compile tld patterns, url matching will be "
- "broken completely: %e", err);
+ "incomplete: %e", err);
g_error_free (err);
ret = FALSE;
}