diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-12 17:58:09 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-12 17:58:09 +0300 |
commit | 9a0362647374be48a29887d0571b8a665877be6b (patch) | |
tree | d2d5de53776d3b1b1faec6cd2254dccf31b81024 /src/plugins/regexp.c | |
parent | 2003dce62438e513e614056540c22f4f755ec88b (diff) | |
download | rspamd-9a0362647374be48a29887d0571b8a665877be6b.tar.gz rspamd-9a0362647374be48a29887d0571b8a665877be6b.zip |
* Some fixes to regexp module
* Add documentation for rspamd regexp module
Diffstat (limited to 'src/plugins/regexp.c')
-rw-r--r-- | src/plugins/regexp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c index a2079bffa..06da6932f 100644 --- a/src/plugins/regexp.c +++ b/src/plugins/regexp.c @@ -68,6 +68,8 @@ regexp_module_init (struct config_file *cfg, struct module_ctx **ctx) regexp_module_ctx->url_filter = NULL; regexp_module_ctx->regexp_pool = memory_pool_new (1024); regexp_module_ctx->items = NULL; + + *ctx = (struct module_ctx *)regexp_module_ctx; return 0; } @@ -141,6 +143,11 @@ process_regexp (struct rspamd_regexp *re, struct worker_task *task) GList *cur; struct uri *url; + if (re == NULL) { + msg_info ("process_regexp: invalid regexp passed"); + return 0; + } + switch (re->type) { case REGEXP_NONE: return 0; |