summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-11-15 20:03:56 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-11-15 20:03:56 +0300
commitc85dd608a568d61e3b24c55b715ad37ceedb7110 (patch)
tree99c2896588bb329d581f3386d44de2cbd80c53bf
parent3b7bcc355f8b9d934b7478005c408af631e14acd (diff)
downloadrspamd-c85dd608a568d61e3b24c55b715ad37ceedb7110.tar.gz
rspamd-c85dd608a568d61e3b24c55b715ad37ceedb7110.zip
Try to fix bug with absent trie items in redirectors list.
-rw-r--r--src/plugins/surbl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c
index 1ebf78991..8627cbbca 100644
--- a/src/plugins/surbl.c
+++ b/src/plugins/surbl.c
@@ -900,7 +900,8 @@ surbl_tree_url_callback (gpointer key, gpointer value, void *data)
f.len = url->hostlen;
/* Search in trie */
if (surbl_module_ctx->redirector_trie &&
- rspamd_trie_lookup (surbl_module_ctx->redirector_trie, url->host, url->hostlen, &idx)) {
+ rspamd_trie_lookup (surbl_module_ctx->redirector_trie, url->host, url->hostlen, &idx) &&
+ idx < surbl_module_ctx->redirector_ptrs->len) {
/* Get corresponding prefix */
red_domain = g_ptr_array_index (surbl_module_ctx->redirector_ptrs, idx);
/* Try to find corresponding regexp */